Mercurial > vim
comparison src/gui.c @ 32489:d6055989fa27 v9.0.1576
patch 9.0.1576: users may not know what to do with an internal error
Commit: https://github.com/vim/vim/commit/097c5370ea8abab17ceb0f3bcd74f57b1655c7f7
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 24 21:02:24 2023 +0100
patch 9.0.1576: users may not know what to do with an internal error
Problem: Users may not know what to do with an internal error.
Solution: Add a translated message with instructions.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 24 May 2023 22:15:06 +0200 |
parents | b2cce50602ca |
children | 448aef880252 |
comparison
equal
deleted
inserted
replaced
32488:dab4184aaff9 | 32489:d6055989fa27 |
---|---|
140 // actually hit this case. | 140 // actually hit this case. |
141 termcapinit(old_term); | 141 termcapinit(old_term); |
142 settmode(TMODE_RAW); // restart RAW mode | 142 settmode(TMODE_RAW); // restart RAW mode |
143 set_title_defaults(); // set 'title' and 'icon' again | 143 set_title_defaults(); // set 'title' and 'icon' again |
144 #if defined(GUI_MAY_SPAWN) && defined(EXPERIMENTAL_GUI_CMD) | 144 #if defined(GUI_MAY_SPAWN) && defined(EXPERIMENTAL_GUI_CMD) |
145 if (msg) | 145 if (msg != NULL) |
146 emsg(msg); | 146 emsg(msg); |
147 #endif | 147 #endif |
148 } | 148 } |
149 | 149 |
150 vim_free(old_term); | 150 vim_free(old_term); |
2784 if (ScreenLines[off + col1] == 0) | 2784 if (ScreenLines[off + col1] == 0) |
2785 { | 2785 { |
2786 if (col1 > 0) | 2786 if (col1 > 0) |
2787 --col1; | 2787 --col1; |
2788 else | 2788 else |
2789 { | |
2790 // FIXME: how can the first character ever be zero? | 2789 // FIXME: how can the first character ever be zero? |
2791 // Make this IEMSGN when it no longer breaks Travis CI. | 2790 siemsg("NUL in ScreenLines in row %ld", (long)gui.row); |
2792 vim_snprintf((char *)IObuff, IOSIZE, | |
2793 "INTERNAL ERROR: NUL in ScreenLines in row %ld", | |
2794 (long)gui.row); | |
2795 msg((char *)IObuff); | |
2796 } | |
2797 } | 2791 } |
2798 #ifdef FEAT_GUI_GTK | 2792 #ifdef FEAT_GUI_GTK |
2799 if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0) | 2793 if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0) |
2800 ++col2; | 2794 ++col2; |
2801 #endif | 2795 #endif |
4398 } | 4392 } |
4399 gui_mch_enable_scrollbar(&wp->w_scrollbars[which], enable); | 4393 gui_mch_enable_scrollbar(&wp->w_scrollbars[which], enable); |
4400 } | 4394 } |
4401 | 4395 |
4402 /* | 4396 /* |
4403 * Scroll a window according to the values set in the globals current_scrollbar | 4397 * Scroll a window according to the values set in the globals |
4404 * and scrollbar_value. Return TRUE if the cursor in the current window moved | 4398 * "current_scrollbar" and "scrollbar_value". |
4405 * or FALSE otherwise. | 4399 * Return TRUE if the cursor in the current window moved or FALSE otherwise. |
4406 */ | 4400 */ |
4407 int | 4401 int |
4408 gui_do_scroll(void) | 4402 gui_do_scroll(void) |
4409 { | 4403 { |
4410 win_T *wp, *save_wp; | 4404 win_T *wp, *save_wp; |