* pos-visible-in-window-p and extreme conditions.
@ 2006-10-05 13:52 Michaël Cadilhac
2006-10-05 14:11 ` Kim F. Storm
2006-10-06 13:31 ` Kim F. Storm
0 siblings, 2 replies; 4+ messages in thread
From: Michaël Cadilhac @ 2006-10-05 13:52 UTC (permalink / raw)
Cc: storm
[-- Attachment #1.1.1: Type: text/plain, Size: 996 bytes --]
I think this change:
2006-09-06 Kim F. Storm <storm@cua.dk>
* xdisp.c (pos_visible_p): Remove exact_mode_line_heights_p arg;
so calculate heights even when pos-visible-in-window-p is called
with partially = t. Don't overshoot last_visible_y in move_it_to.
Return row height and row number in new rowh and vpos args.
(cursor_row_fully_visible_p): First line is always "fully visible".
(try_window): Don't clear matrix if vscrolled.
introduced a bug in one-line windows (i.e. minibuffer). Especially the
part « Don't overshoot ... ».
- Test case:
emacs -Q
M-x set-variable RET window-min-height RET 1 RET
Make the buffer empty and the window 1 line.
type « kungfu ». Use M-: (pos-visible-in-window-p nil nil t) on
different points :
o C-a (bob) -> (0 0)
o on the `g' -> (21 0)
o C-e (eob (there's no \n)) -> nil
This is due to move_it_to that returns an `it' with 1 as its
IT_CHARPOS on single-line windows.
- I propose the following change (revert):
[-- Attachment #1.1.2: xdisp.patch --]
[-- Type: text/x-patch, Size: 1367 bytes --]
Index: xdisp.c
===================================================================
RCS file: /sources/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1123
diff -c -r1.1123 xdisp.c
*** xdisp.c 1 Oct 2006 16:44:43 -0000 1.1123
--- xdisp.c 5 Oct 2006 13:50:47 -0000
***************
*** 1313,1319 ****
current_buffer->header_line_format);
start_display (&it, w, top);
! move_it_to (&it, charpos, -1, it.last_visible_y-1, -1,
(charpos >= 0 ? MOVE_TO_POS : 0) | MOVE_TO_Y);
/* Note that we may overshoot because of invisible text. */
--- 1313,1319 ----
current_buffer->header_line_format);
start_display (&it, w, top);
! move_it_to (&it, charpos, -1, it.last_visible_y, -1,
(charpos >= 0 ? MOVE_TO_POS : 0) | MOVE_TO_Y);
/* Note that we may overshoot because of invisible text. */
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.5342
diff -c -0 -r1.5342 ChangeLog
*** ChangeLog 1 Oct 2006 16:44:43 -0000 1.5342
--- ChangeLog 5 Oct 2006 13:50:53 -0000
***************
*** 0 ****
--- 1,5 ----
+ 2006-10-05 Michaël Cadilhac <michael.cadilhac@lrde.org>
+
+ * xdisp.c (pos_visible_p): Consider last_visible_y to be the tight
+ limit for move_it_to.
+
[-- Attachment #1.1.3: Type: text/plain, Size: 393 bytes --]
--
/!\ My mail address changed, please update your files accordingly.
| Michaël `Micha' Cadilhac | Mieux vaut se taire |
| Epita/LRDE Promo 2007 | Que de parler trop fort. |
| http://michael.cadilhac.name | -- As de trèfle |
`-- - JID: micha@amessage.be --' - --'
[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]
[-- Attachment #2: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pos-visible-in-window-p and extreme conditions.
2006-10-05 13:52 pos-visible-in-window-p and extreme conditions Michaël Cadilhac
@ 2006-10-05 14:11 ` Kim F. Storm
2006-10-06 13:31 ` Kim F. Storm
1 sibling, 0 replies; 4+ messages in thread
From: Kim F. Storm @ 2006-10-05 14:11 UTC (permalink / raw)
Cc: emacs-devel
michael@cadilhac.name (Michaël Cadilhac) writes:
> - Test case:
> emacs -Q
> M-x set-variable RET window-min-height RET 1 RET
> Make the buffer empty and the window 1 line.
> type « kungfu ». Use M-: (pos-visible-in-window-p nil nil t) on
> different points :
> o C-a (bob) -> (0 0)
> o on the `g' -> (21 0)
> o C-e (eob (there's no \n)) -> nil
>
> This is due to move_it_to that returns an `it' with 1 as its
> IT_CHARPOS on single-line windows.
Thanks for the report.
I'll look into fixing this.
BTW, does the bad behaviour break any specific code/behavior?
>
> - I propose the following change (revert):
That fix was made to make partial scrolling of tall images work
in non-trivial cases. So reverting it is not TRT.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pos-visible-in-window-p and extreme conditions.
2006-10-05 13:52 pos-visible-in-window-p and extreme conditions Michaël Cadilhac
2006-10-05 14:11 ` Kim F. Storm
@ 2006-10-06 13:31 ` Kim F. Storm
2006-10-06 13:38 ` Michaël Cadilhac
1 sibling, 1 reply; 4+ messages in thread
From: Kim F. Storm @ 2006-10-06 13:31 UTC (permalink / raw)
Cc: emacs-devel
michael@cadilhac.name (Michaël Cadilhac) writes:
> I think this change:
>
> 2006-09-06 Kim F. Storm <storm@cua.dk>
>
> * xdisp.c (pos_visible_p): Remove exact_mode_line_heights_p arg;
> so calculate heights even when pos-visible-in-window-p is called
> with partially = t. Don't overshoot last_visible_y in move_it_to.
> Return row height and row number in new rowh and vpos args.
> (cursor_row_fully_visible_p): First line is always "fully visible".
> (try_window): Don't clear matrix if vscrolled.
>
> introduced a bug in one-line windows (i.e. minibuffer). Especially the
> part « Don't overshoot ... ».
Should be fixed now.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-10-06 13:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-05 13:52 pos-visible-in-window-p and extreme conditions Michaël Cadilhac
2006-10-05 14:11 ` Kim F. Storm
2006-10-06 13:31 ` Kim F. Storm
2006-10-06 13:38 ` Michaël Cadilhac
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.