Mercurial > vim
comparison src/message.c @ 30351:c8c7adcf2ddc v9.0.0511
patch 9.0.0511: unnecessary scrolling for message of only one line
Commit: https://github.com/vim/vim/commit/bdedd2bcce3a59028c7504a397ff77d901b1b12a
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Sep 20 12:45:15 2022 +0100
patch 9.0.0511: unnecessary scrolling for message of only one line
Problem: Unnecessary scrolling for message of only one line.
Solution: Only set msg_scroll when needed. (closes https://github.com/vim/vim/issues/11178)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 20 Sep 2022 14:00:05 +0200 |
parents | b6b803ed4a53 |
children | ea15dfc9c155 |
comparison
equal
deleted
inserted
replaced
30350:d4c446a0105e | 30351:c8c7adcf2ddc |
---|---|
533 // Bail out if something called here causes an error. | 533 // Bail out if something called here causes an error. |
534 if (recursive) | 534 if (recursive) |
535 return; | 535 return; |
536 recursive = TRUE; | 536 recursive = TRUE; |
537 | 537 |
538 msg_scroll = TRUE; // this will take more than one line | |
539 ++no_wait_return; | 538 ++no_wait_return; |
540 p = get_emsg_source(); | 539 p = get_emsg_source(); |
541 if (p != NULL) | 540 if (p != NULL) |
542 { | 541 { |
542 msg_scroll = TRUE; // this will take more than one line | |
543 msg_attr((char *)p, attr); | 543 msg_attr((char *)p, attr); |
544 vim_free(p); | 544 vim_free(p); |
545 } | 545 } |
546 p = get_emsg_lnum(); | 546 p = get_emsg_lnum(); |
547 if (p != NULL) | 547 if (p != NULL) |
765 #ifdef FEAT_JOB_CHANNEL | 765 #ifdef FEAT_JOB_CHANNEL |
766 emsg_to_channel_log = TRUE; | 766 emsg_to_channel_log = TRUE; |
767 #endif | 767 #endif |
768 /* | 768 /* |
769 * Display name and line number for the source of the error. | 769 * Display name and line number for the source of the error. |
770 * Sets "msg_scroll". | |
771 */ | 770 */ |
771 msg_scroll = TRUE; | |
772 msg_source(attr); | 772 msg_source(attr); |
773 | 773 |
774 /* | 774 /* |
775 * Display the error message itself. | 775 * Display the error message itself. |
776 */ | 776 */ |