[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Point of wrong window used in read-from-minibuffer?
From: |
Stefan Monnier |
Subject: |
Re: Point of wrong window used in read-from-minibuffer? |
Date: |
Tue, 12 Apr 2005 08:27:17 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) |
> the patch fixes the "reduced" error, but not the original problem.
Can you try the patch below instead?
It seems to fix it for me *and* it explains why font-lock-mode is
a necessary ingredient.
Stefan
--- window.c 02 mar 2005 22:20:12 -0500 1.496
+++ window.c 12 avr 2005 08:17:51 -0400
@@ -5589,6 +5591,17 @@
{
if (XBUFFER (new_current_buffer) == current_buffer)
old_point = PT;
+ else
+ /* BUF_PT (XBUFFER (new_current_buffer)) gives us the position of
+ point in new_current_buffer as of the last time this buffer was
+ used. This can be non-deterministic since it can be changed by
+ things like jit-lock by mere temporary selection of some random
+ window that happens to show this buffer.
+ So if possible we want this arbitrary choice of "which point" to
+ be the one from the to-be-selected-window so as to prevent this
+ window's cursor from being copied from another window. */
+ if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer))
+ old_point = XMARKER (XWINDOW (data->current_window)->pointm)->charpos;
else
old_point = BUF_PT (XBUFFER (new_current_buffer));
}
- Point of wrong window used in read-from-minibuffer?, Ulf Klaperski, 2005/04/04
- Re: Point of wrong window used in read-from-minibuffer?, Stefan Monnier, 2005/04/04
- Re: Point of wrong window used in read-from-minibuffer?, Stefan Monnier, 2005/04/05
- Re: Point of wrong window used in read-from-minibuffer?, Richard Stallman, 2005/04/13
- Re: Point of wrong window used in read-from-minibuffer?, Stefan Monnier, 2005/04/13
- Re: Point of wrong window used in read-from-minibuffer?, Richard Stallman, 2005/04/14
- Re: Point of wrong window used in read-from-minibuffer?, Stefan Monnier, 2005/04/14
- Re: Point of wrong window used in read-from-minibuffer?, Richard Stallman, 2005/04/17
- Re: Point of wrong window used in read-from-minibuffer?, Stefan Monnier, 2005/04/17
- Re: Point of wrong window used in read-from-minibuffer?, Stefan Monnier, 2005/04/17
- Re: Point of wrong window used in read-from-minibuffer?, Richard Stallman, 2005/04/24
- Re: Point of wrong window used in read-from-minibuffer?, Stefan Monnier, 2005/04/25