diff options
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c index b470b705397..0e318b039a4 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -672,7 +672,7 @@ coordinates_in_window (w, x, y) | |||
| 672 | 672 | ||
| 673 | /* Outside any interesting column? */ | 673 | /* Outside any interesting column? */ |
| 674 | if (*x < left_x || *x > right_x) | 674 | if (*x < left_x || *x > right_x) |
| 675 | return ON_NOTHING; | 675 | return ON_VERTICAL_BORDER; |
| 676 | 676 | ||
| 677 | lmargin_width = window_box_width (w, LEFT_MARGIN_AREA); | 677 | lmargin_width = window_box_width (w, LEFT_MARGIN_AREA); |
| 678 | rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA); | 678 | rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA); |
| @@ -1801,7 +1801,7 @@ static Lisp_Object | |||
| 1801 | window_list_1 (window, minibuf, all_frames) | 1801 | window_list_1 (window, minibuf, all_frames) |
| 1802 | Lisp_Object window, minibuf, all_frames; | 1802 | Lisp_Object window, minibuf, all_frames; |
| 1803 | { | 1803 | { |
| 1804 | Lisp_Object tail, list; | 1804 | Lisp_Object tail, list, rest; |
| 1805 | 1805 | ||
| 1806 | decode_next_window_args (&window, &minibuf, &all_frames); | 1806 | decode_next_window_args (&window, &minibuf, &all_frames); |
| 1807 | list = Qnil; | 1807 | list = Qnil; |
| @@ -1810,7 +1810,17 @@ window_list_1 (window, minibuf, all_frames) | |||
| 1810 | if (candidate_window_p (XCAR (tail), window, minibuf, all_frames)) | 1810 | if (candidate_window_p (XCAR (tail), window, minibuf, all_frames)) |
| 1811 | list = Fcons (XCAR (tail), list); | 1811 | list = Fcons (XCAR (tail), list); |
| 1812 | 1812 | ||
| 1813 | return Fnreverse (list); | 1813 | /* Rotate the list to start with WINDOW. */ |
| 1814 | list = Fnreverse (list); | ||
| 1815 | rest = Fmemq (window, list); | ||
| 1816 | if (!NILP (rest) && !EQ (rest, list)) | ||
| 1817 | { | ||
| 1818 | for (tail = list; XCDR (tail) != rest; tail = XCDR (tail)) | ||
| 1819 | ; | ||
| 1820 | XSETCDR (tail, Qnil); | ||
| 1821 | list = nconc2 (rest, list); | ||
| 1822 | } | ||
| 1823 | return list; | ||
| 1814 | } | 1824 | } |
| 1815 | 1825 | ||
| 1816 | 1826 | ||