]> code.delx.au - gnu-emacs/commitdiff
Add assertion in adjust_point_for_property
authorNicolas Richard <youngfrog@members.fsf.org>
Sat, 6 Jun 2015 08:05:07 +0000 (10:05 +0200)
committerNicolas Richard <theonewiththeevillook@yahoo.fr>
Sat, 6 Jun 2015 11:23:18 +0000 (13:23 +0200)
* src/keyboard.c (adjust_point_for_property): Add eassert for
current buffer being shown in selected window.

src/keyboard.c

index bedd10bc33e1f613127e66b48472c56514656aea..23f7ce771436906d65bfac2aa7c377b38af3cf9b 100644 (file)
@@ -1687,6 +1687,8 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified)
   bool check_composition = ! modified, check_display = 1, check_invisible = 1;
   ptrdiff_t orig_pt = PT;
 
+  eassert (XBUFFER (XWINDOW (selected_window)->contents) == current_buffer);
+
   /* FIXME: cycling is probably not necessary because these properties
      can't be usefully combined anyway.  */
   while (check_composition || check_display || check_invisible)