From: Nicolas Richard <youngfrog@members.fsf.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 20734-done@debbugs.gnu.org
Subject: bug#20734: 25.0.50; "Args out of range" with help-window-select t
Date: Sat, 06 Jun 2015 10:44:26 +0200 [thread overview]
Message-ID: <866171kyz9.fsf@members.fsf.org> (raw)
In-Reply-To: <86vbf3tfwj.fsf@members.fsf.org>
[-- Attachment #1: Type: text/plain, Size: 184 bytes --]
>> Ok. I think I understand now. What about adding an assertion to make
>> sure current_buffer is shown in selected_window at that point?
>
> That'd be fine with me.
I can suggest :
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-assertion-in-adjust_point_for_property.patch --]
[-- Type: text/x-diff, Size: 971 bytes --]
From 52cd3204743442fc6d8fc281ed3d9b0b0e6a88e4 Mon Sep 17 00:00:00 2001
From: Nicolas Richard <youngfrog@members.fsf.org>
Date: Sat, 6 Jun 2015 10:05:07 +0200
Subject: [PATCH] Add assertion in adjust_point_for_property
* src/keyboard.c (adjust_point_for_property): Add eassert for
current buffer being shown in selected window.
---
src/keyboard.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/keyboard.c b/src/keyboard.c
index bedd10b..23f7ce7 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -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)
--
1.9.1
[-- Attachment #3: Type: text/plain, Size: 275 bytes --]
>> && EQ (XBUFFER (XWINDOW (selected_window)->contents), current_buffer)
> in that case, you don't need EQ, just use == to
> compare 2 C pointers.
Ok, I pushed that solution as d31cd49 and I mark the bug as done. Thanks
for your guidance.
--
Nico.
next prev parent reply other threads:[~2015-06-06 8:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 19:47 bug#20734: 25.0.50; "Args out of range" with help-window-select t Nicolas Richard
2015-06-04 22:27 ` Stefan Monnier
2015-06-05 9:33 ` Nicolas Richard
2015-06-05 13:46 ` Eli Zaretskii
2015-06-05 6:41 ` Eli Zaretskii
2015-06-05 9:25 ` Nicolas Richard
2015-06-05 13:45 ` Eli Zaretskii
2015-06-05 19:48 ` Nicolas Richard
2015-06-05 19:56 ` Eli Zaretskii
2015-06-06 8:44 ` Nicolas Richard [this message]
2015-06-06 8:56 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=866171kyz9.fsf@members.fsf.org \
--to=youngfrog@members.fsf.org \
--cc=20734-done@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.