diff options
| author | Stefan Monnier | 2010-12-25 23:04:58 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2010-12-25 23:04:58 -0500 |
| commit | 794b75c7690370d5a4fcc09a6121972f3886cd25 (patch) | |
| tree | c2eccc91db0940610bdd979e26e816f971787a52 /src/window.c | |
| parent | 58bdfa4ccd1c4ce9591966352cb15b9a9d65a484 (diff) | |
| download | emacs-794b75c7690370d5a4fcc09a6121972f3886cd25.tar.gz emacs-794b75c7690370d5a4fcc09a6121972f3886cd25.zip | |
* src/window.c (Fmove_to_window_line): Avoid abort when called in a buffer
different from selected-window's.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c index f9a2d31b4fe..1c50e997684 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -5856,6 +5856,12 @@ zero means top of window, negative means relative to bottom of window. */) | |||
| 5856 | int this_scroll_margin; | 5856 | int this_scroll_margin; |
| 5857 | #endif | 5857 | #endif |
| 5858 | 5858 | ||
| 5859 | if (!(BUFFERP (w->buffer) | ||
| 5860 | && XBUFFER (w->buffer) == current_buffer)) | ||
| 5861 | /* This test is needed to make sure PT/PT_BYTE make sense in w->buffer | ||
| 5862 | when passed below to set_marker_both. */ | ||
| 5863 | error ("move-to-window-line called from unrelated buffer"); | ||
| 5864 | |||
| 5859 | window = selected_window; | 5865 | window = selected_window; |
| 5860 | start = marker_position (w->start); | 5866 | start = marker_position (w->start); |
| 5861 | if (start < BEGV || start > ZV) | 5867 | if (start < BEGV || start > ZV) |