Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
cae07000
Commit
cae07000
authored
Mar 09, 2012
by
Stefan Monnier
Browse files
* src/buffer.c (compare_overlays): Avoid qsort's instability.
Fixes: debbugs:6830
parent
4f96ea3f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
src/ChangeLog
src/ChangeLog
+12
-8
src/buffer.c
src/buffer.c
+5
-1
No files found.
src/ChangeLog
View file @
cae07000
2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
* buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
* gtkutil.c (x_wm_set_size_hint): Use one row in call to
...
...
@@ -201,8 +205,8 @@
2012-02-04 Eli Zaretskii <eliz@gnu.org>
* w32.c (get_emacs_configuration_options):
Include
--enable-checking, if specified, in the return value.
* w32.c (get_emacs_configuration_options):
Include
--enable-checking, if specified, in the return value.
2012-02-04 Martin Rudalics <rudalics@gmx.at>
...
...
@@ -308,8 +312,8 @@
2012-01-19 Martin Rudalics <rudalics@gmx.at>
* window.c (save_window_save, Fcurrent_window_configuration)
(Vwindow_persistent_parameters): Do not use Qstate.
Rewrite
doc-strings.
(Vwindow_persistent_parameters): Do not use Qstate.
Rewrite
doc-strings.
2012-01-19 Kenichi Handa <handa@m17n.org>
...
...
@@ -483,9 +487,9 @@
* nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
(symbol_to_nsstring): Fix indentation.
(ns_symbol_to_pb): New function.
(Fns_get_selection_internal): Rename
d
from Fns_get_cut_buffer_internal.
(Fns_rotate_cut_buffers_internal): Remove
d
.
(Fns_store_selection_internal): Rename
d
from
(Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
(Fns_rotate_cut_buffers_internal): Remove.
(Fns_store_selection_internal): Rename from
Fns_store_cut_buffer_internal.
(ns_get_foreign_selection, Fx_own_selection_internal)
(Fx_disown_selection_internal, Fx_selection_exists_p)
...
...
@@ -626,7 +630,7 @@
(coding_set_destination): Return how many bytes
coding->destination was relocated.
(CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
(CODING_CHAR_CHARSET_P): Adjust
ed
for the avove changes.
(CODING_CHAR_CHARSET_P): Adjust for the avove changes.
2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
...
...
src/buffer.c
View file @
cae07000
...
...
@@ -2864,7 +2864,11 @@ compare_overlays (const void *v1, const void *v2)
return s1->beg < s2->beg ? -1 : 1;
if (s1->end != s2->end)
return s2->end < s1->end ? -1 : 1;
return
0
;
/* Avoid the non-determinism of qsort by choosing an arbitrary ordering
between "equal" overlays. The result can still change between
invocations of Emacs, but it won't change in the middle of
`find_field' (bug#6830). */
return XHASH (s1->overlay) < XHASH (s2->overlay) ? -1 : 1;
}
/* Sort an array of overlays by priority. The array is modified in place.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment