[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5643] don't scroll windows too soon
From: |
Gavin D. Smith |
Subject: |
[5643] don't scroll windows too soon |
Date: |
Thu, 05 Jun 2014 15:29:55 +0000 |
Revision: 5643
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5643
Author: gavin
Date: 2014-06-05 15:29:55 +0000 (Thu, 05 Jun 2014)
Log Message:
-----------
don't scroll windows too soon
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/echo-area.c
trunk/info/session.c
trunk/info/window.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-06-05 14:27:44 UTC (rev 5642)
+++ trunk/ChangeLog 2014-06-05 15:29:55 UTC (rev 5643)
@@ -3,6 +3,21 @@
* info/session.c (gc_file_buffers_and_nodes): Check equality with
'filename' field as well as 'fullpath' field of FILE_BUFFER.
+ * info/echo-area.c (restore_calling_window): Remove handling of window
+ pagetops. Don't call display update functions. Remove disabled code.
+ (ea_possible_completions): Remove handling of window pagetops.
+
+ * info/window.c (window_make_window): Don't call window_adjust_pagetop.
+ It's possible that the new window could be closed without the old
+ window having been selected in the meantime, and this would leave the
+ point where it was.
+ * info/session.c (info_next_window, info_prev_window): Call
+ window_adjust_pagetop on newly active window.
+ * info/window.c (window_change_window_height): Don't call
+ window_adjust_pagetop.
+ (window_set_node_of_window): Don't call window_adjust_pagetop if there
+ is no node.
+
2014-06-05 Gavin Smith <address@hidden>
* info/nodes.h (N_IsIndex): New macro.
Modified: trunk/info/echo-area.c
===================================================================
--- trunk/info/echo-area.c 2014-06-05 14:27:44 UTC (rev 5642)
+++ trunk/info/echo-area.c 2014-06-05 15:29:55 UTC (rev 5643)
@@ -119,39 +119,10 @@
pending which created a completions window. */
if (compwin)
{
- if ((compwin != windows || windows->next) &&
- !echo_area_stack_contains_completions_p ())
+ if ((compwin != windows || windows->next)
+ && !echo_area_stack_contains_completions_p ())
{
- WINDOW *next;
- int pagetop = 0;
- int start = 0;
- int end = 0;
- int amount = 0;
-
- next = compwin->next;
- if (next)
- {
- start = next->first_row;
- end = start + next->height;
- amount = - (compwin->height + 1);
- pagetop = next->pagetop;
- }
-
info_delete_window_internal (compwin);
-
- /* This is not necessary because info_delete_window_internal ()
- calls echo_area_inform_of_deleted_window (), which does the
- right thing. */
-#if defined (UNNECESSARY)
- echo_area_completions_window = NULL;
-#endif /* UNNECESSARY */
-
- if (next)
- {
- display_scroll_display (start, end, amount);
- next->pagetop = pagetop;
- display_update_display (windows);
- }
}
}
}
@@ -1044,32 +1015,15 @@
if (calling_window->height > (iterations * 2)
&& calling_window->height / 2 >= WINDOW_MIN_SIZE)
{
- int pagetop;
+ remember_calling_window (calling_window);
active_window = calling_window;
-
- /* Perhaps we can scroll this window on redisplay. */
- pagetop = calling_window->pagetop;
-
compwin = window_make_window ();
- info_set_node_of_window (compwin,
- possible_completions_output_node);
- active_window = the_echo_area;
window_change_window_height
(compwin, -(compwin->height - (iterations + 2)));
- window_adjust_pagetop (calling_window);
- remember_calling_window (calling_window);
-
- /* If the pagetop has changed, set the new pagetop here. */
- if (pagetop != calling_window->pagetop)
- {
- int newtop = calling_window->pagetop;
- calling_window->pagetop = pagetop;
- set_window_pagetop (calling_window, newtop);
- }
-
echo_area_completions_window = compwin;
+ active_window = the_echo_area;
}
else
compwin = calling_window;
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-06-05 14:27:44 UTC (rev 5642)
+++ trunk/info/session.c 2014-06-05 15:29:55 UTC (rev 5643)
@@ -1217,6 +1217,9 @@
if (auto_footnotes_p)
info_get_or_remove_footnotes (window);
+ /* Point may not be within part of node displayed in window if there
+ has been resizing of this window since the last time it was active. */
+ window_adjust_pagetop (window);
window->flags |= W_UpdateWindow;
active_window = window;
}
@@ -1243,8 +1246,8 @@
{
/* If we are in the echo area, or if the echo area isn't active and we
are in the first window, find the last window in the chain. */
- if (window == the_echo_area ||
- (window == windows && !echo_area_is_active))
+ if (window == the_echo_area
+ || window == windows && !echo_area_is_active)
{
register WINDOW *win, *last = NULL;
@@ -1267,6 +1270,9 @@
if (auto_footnotes_p)
info_get_or_remove_footnotes (window);
+ /* Point may not be within part of node displayed in window if there
+ has been resizing of this window since the last time it was active. */
+ window_adjust_pagetop (window);
window->flags |= W_UpdateWindow;
active_window = window;
}
Modified: trunk/info/window.c
===================================================================
--- trunk/info/window.c 2014-06-05 14:27:44 UTC (rev 5642)
+++ trunk/info/window.c 2014-06-05 15:29:55 UTC (rev 5643)
@@ -295,8 +295,6 @@
active_window->height -= (window->height + 1);
active_window->flags |= W_UpdateWindow;
- /* We do have to readjust the existing active window. */
- window_adjust_pagetop (active_window);
window_make_modeline (active_window);
/* This window is just after the active one. Which window is active is
@@ -316,7 +314,6 @@
me->height += diff; \
next->height -= diff; \
next->first_row += diff; \
- window_adjust_pagetop (next); \
} while (0)
#define grow_me_shrinking_prev(me, prev, diff) \
@@ -324,7 +321,6 @@
me->height += diff; \
prev->height -= diff; \
me->first_row -=diff; \
- window_adjust_pagetop (prev); \
} while (0)
#define shrink_me_growing_next(me, next, diff) \
@@ -332,7 +328,6 @@
me->height -= diff; \
next->height += diff; \
next->first_row -= diff; \
- window_adjust_pagetop (next); \
} while (0)
#define shrink_me_growing_prev(me, prev, diff) \
@@ -340,7 +335,6 @@
me->height -= diff; \
prev->height += diff; \
me->first_row += diff; \
- window_adjust_pagetop (prev); \
} while (0)
/* Change the height of WINDOW by AMOUNT. This also automagically adjusts
@@ -459,8 +453,6 @@
next->first_row++;
}
}
- window_adjust_pagetop (prev);
- window_adjust_pagetop (next);
}
}
if (prev)
@@ -470,7 +462,6 @@
next->flags |= W_UpdateWindow;
window->flags |= W_UpdateWindow;
- window_adjust_pagetop (window);
}
/* Tile all of the windows currently displayed in the global variable
@@ -575,9 +566,12 @@
window->point = 0;
recalculate_line_starts (window);
window->flags |= W_UpdateWindow;
- /* The display_pos member is nonzero if we're displaying an anchor. */
- window->point = node ? node->display_pos : 0;
- window_adjust_pagetop (window);
+ if (node)
+ {
+ /* The display_pos member is nonzero if we're displaying an anchor. */
+ window->point = node ? node->display_pos : 0;
+ window_adjust_pagetop (window);
+ }
window_make_modeline (window);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5643] don't scroll windows too soon,
Gavin D. Smith <=