diff options
| author | Joakim Verona | 2013-02-11 00:03:42 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-02-11 00:03:42 +0100 |
| commit | 77f4834db1299b571b1fb3dfb120e5e50eec7cb1 (patch) | |
| tree | afe4035739ce5bd25799ed469f67939431ae91a3 /src | |
| parent | 33cc2cd4d53f845b7d1e681dbbe8166acdb652c3 (diff) | |
| parent | a4ba3963957c289a913b32bca9531aadcc3f377f (diff) | |
| download | emacs-77f4834db1299b571b1fb3dfb120e5e50eec7cb1.tar.gz emacs-77f4834db1299b571b1fb3dfb120e5e50eec7cb1.zip | |
auto upstream
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 16 | ||||
| -rw-r--r-- | src/fileio.c | 4 | ||||
| -rw-r--r-- | src/syntax.c | 1 | ||||
| -rw-r--r-- | src/xdisp.c | 19 |
4 files changed, 34 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 05d69382855..9d8540075de 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2013-02-10 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (move_it_vertically_backward, move_it_by_lines): When | ||
| 4 | text lines are longer than window's screen lines, don't move back | ||
| 5 | too far. This speeds up some redisplay operations. (Bug#13675) | ||
| 6 | |||
| 7 | 2013-02-10 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 8 | |||
| 9 | * syntax.c (scan_sexps_forward): Fix byte position calculation | ||
| 10 | Bug#13664 (a.k.a Bug#13667) introduced with 2013-02-08 change. | ||
| 11 | |||
| 12 | 2013-02-10 Paul Eggert <eggert@cs.ucla.edu> | ||
| 13 | |||
| 14 | * fileio.c (Fexpand_file_name): Omit confusing pointer comparison | ||
| 15 | that was not needed. | ||
| 16 | |||
| 1 | 2013-02-09 Paul Eggert <eggert@cs.ucla.edu> | 17 | 2013-02-09 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 18 | ||
| 3 | Minor hashing refactoring. | 19 | Minor hashing refactoring. |
diff --git a/src/fileio.c b/src/fileio.c index 1b293e3a971..ddf23867104 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1348,8 +1348,8 @@ filesystem tree, not (expand-file-name ".." dirname). */) | |||
| 1348 | #ifdef WINDOWSNT | 1348 | #ifdef WINDOWSNT |
| 1349 | char *prev_o = o; | 1349 | char *prev_o = o; |
| 1350 | #endif | 1350 | #endif |
| 1351 | while (o != target && (--o) && !IS_DIRECTORY_SEP (*o)) | 1351 | while (o != target && (--o, !IS_DIRECTORY_SEP (*o))) |
| 1352 | ; | 1352 | continue; |
| 1353 | #ifdef WINDOWSNT | 1353 | #ifdef WINDOWSNT |
| 1354 | /* Don't go below server level in UNC filenames. */ | 1354 | /* Don't go below server level in UNC filenames. */ |
| 1355 | if (o == target + 1 && IS_DIRECTORY_SEP (*o) | 1355 | if (o == target + 1 && IS_DIRECTORY_SEP (*o) |
diff --git a/src/syntax.c b/src/syntax.c index 42500b0cb76..390d732944d 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -3278,6 +3278,7 @@ do { prev_from = from; \ | |||
| 3278 | 3278 | ||
| 3279 | stop: /* Here if stopping before start of sexp. */ | 3279 | stop: /* Here if stopping before start of sexp. */ |
| 3280 | from = prev_from; /* We have just fetched the char that starts it; */ | 3280 | from = prev_from; /* We have just fetched the char that starts it; */ |
| 3281 | from_byte = prev_from_byte; | ||
| 3281 | goto done; /* but return the position before it. */ | 3282 | goto done; /* but return the position before it. */ |
| 3282 | 3283 | ||
| 3283 | endquoted: | 3284 | endquoted: |
diff --git a/src/xdisp.c b/src/xdisp.c index 83a58aee32d..5b2eb1e84c8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -9046,6 +9046,9 @@ move_it_vertically_backward (struct it *it, int dy) | |||
| 9046 | struct it it2, it3; | 9046 | struct it it2, it3; |
| 9047 | void *it2data = NULL, *it3data = NULL; | 9047 | void *it2data = NULL, *it3data = NULL; |
| 9048 | ptrdiff_t start_pos; | 9048 | ptrdiff_t start_pos; |
| 9049 | int nchars_per_row | ||
| 9050 | = (it->last_visible_x - it->first_visible_x) / FRAME_COLUMN_WIDTH (it->f); | ||
| 9051 | ptrdiff_t pos_limit; | ||
| 9049 | 9052 | ||
| 9050 | move_further_back: | 9053 | move_further_back: |
| 9051 | eassert (dy >= 0); | 9054 | eassert (dy >= 0); |
| @@ -9054,9 +9057,12 @@ move_it_vertically_backward (struct it *it, int dy) | |||
| 9054 | 9057 | ||
| 9055 | /* Estimate how many newlines we must move back. */ | 9058 | /* Estimate how many newlines we must move back. */ |
| 9056 | nlines = max (1, dy / FRAME_LINE_HEIGHT (it->f)); | 9059 | nlines = max (1, dy / FRAME_LINE_HEIGHT (it->f)); |
| 9060 | pos_limit = max (start_pos - nlines * nchars_per_row, BEGV); | ||
| 9057 | 9061 | ||
| 9058 | /* Set the iterator's position that many lines back. */ | 9062 | /* Set the iterator's position that many lines back. But don't go |
| 9059 | while (nlines-- && IT_CHARPOS (*it) > BEGV) | 9063 | back more than NLINES full screen lines -- this wins a day with |
| 9064 | buffers which have very long lines. */ | ||
| 9065 | while (nlines-- && IT_CHARPOS (*it) > pos_limit) | ||
| 9060 | back_to_previous_visible_line_start (it); | 9066 | back_to_previous_visible_line_start (it); |
| 9061 | 9067 | ||
| 9062 | /* Reseat the iterator here. When moving backward, we don't want | 9068 | /* Reseat the iterator here. When moving backward, we don't want |
| @@ -9287,6 +9293,9 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos) | |||
| 9287 | struct it it2; | 9293 | struct it it2; |
| 9288 | void *it2data = NULL; | 9294 | void *it2data = NULL; |
| 9289 | ptrdiff_t start_charpos, i; | 9295 | ptrdiff_t start_charpos, i; |
| 9296 | int nchars_per_row | ||
| 9297 | = (it->last_visible_x - it->first_visible_x) / FRAME_COLUMN_WIDTH (it->f); | ||
| 9298 | ptrdiff_t pos_limit; | ||
| 9290 | 9299 | ||
| 9291 | /* Start at the beginning of the screen line containing IT's | 9300 | /* Start at the beginning of the screen line containing IT's |
| 9292 | position. This may actually move vertically backwards, | 9301 | position. This may actually move vertically backwards, |
| @@ -9295,9 +9304,11 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos) | |||
| 9295 | move_it_vertically_backward (it, 0); | 9304 | move_it_vertically_backward (it, 0); |
| 9296 | dvpos -= it->vpos; | 9305 | dvpos -= it->vpos; |
| 9297 | 9306 | ||
| 9298 | /* Go back -DVPOS visible lines and reseat the iterator there. */ | 9307 | /* Go back -DVPOS buffer lines, but no farther than -DVPOS full |
| 9308 | screen lines, and reseat the iterator there. */ | ||
| 9299 | start_charpos = IT_CHARPOS (*it); | 9309 | start_charpos = IT_CHARPOS (*it); |
| 9300 | for (i = -dvpos; i > 0 && IT_CHARPOS (*it) > BEGV; --i) | 9310 | pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV); |
| 9311 | for (i = -dvpos; i > 0 && IT_CHARPOS (*it) > pos_limit; --i) | ||
| 9301 | back_to_previous_visible_line_start (it); | 9312 | back_to_previous_visible_line_start (it); |
| 9302 | reseat (it, it->current.pos, 1); | 9313 | reseat (it, it->current.pos, 1); |
| 9303 | 9314 | ||