Mercurial > vim
comparison src/window.c @ 26913:d4e61d61afd9 v8.2.3985
patch 8.2.3985: error messages are spread out
Commit: https://github.com/vim/vim/commit/ac78dd4a352196ca4e6640f8e4caaf126afd49e3
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 2 19:25:26 2022 +0000
patch 8.2.3985: error messages are spread out
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 02 Jan 2022 20:30:04 +0100 |
parents | 79c76ca2c53c |
children | 85866e069c24 |
comparison
equal
deleted
inserted
replaced
26912:e6751c1e2a8e | 26913:d4e61d61afd9 |
---|---|
258 case 'P': | 258 case 'P': |
259 FOR_ALL_WINDOWS(wp) | 259 FOR_ALL_WINDOWS(wp) |
260 if (wp->w_p_pvw) | 260 if (wp->w_p_pvw) |
261 break; | 261 break; |
262 if (wp == NULL) | 262 if (wp == NULL) |
263 emsg(_("E441: There is no preview window")); | 263 emsg(_(e_there_is_no_preview_window)); |
264 else | 264 else |
265 win_goto(wp); | 265 win_goto(wp); |
266 break; | 266 break; |
267 #endif | 267 #endif |
268 | 268 |
815 | 815 |
816 // Add flags from ":vertical", ":topleft" and ":botright". | 816 // Add flags from ":vertical", ":topleft" and ":botright". |
817 flags |= cmdmod.cmod_split; | 817 flags |= cmdmod.cmod_split; |
818 if ((flags & WSP_TOP) && (flags & WSP_BOT)) | 818 if ((flags & WSP_TOP) && (flags & WSP_BOT)) |
819 { | 819 { |
820 emsg(_("E442: Can't split topleft and botright at the same time")); | 820 emsg(_(e_cant_split_topleft_and_botright_at_the_same_time)); |
821 return FAIL; | 821 return FAIL; |
822 } | 822 } |
823 | 823 |
824 // When creating the help window make a snapshot of the window layout. | 824 // When creating the help window make a snapshot of the window layout. |
825 // Otherwise clear the snapshot, it's now invalid. | 825 // Otherwise clear the snapshot, it's now invalid. |
1719 | 1719 |
1720 // Check if all frames in this row/col have one window. | 1720 // Check if all frames in this row/col have one window. |
1721 FOR_ALL_FRAMES(frp, curwin->w_frame->fr_parent->fr_child) | 1721 FOR_ALL_FRAMES(frp, curwin->w_frame->fr_parent->fr_child) |
1722 if (frp->fr_win == NULL) | 1722 if (frp->fr_win == NULL) |
1723 { | 1723 { |
1724 emsg(_("E443: Cannot rotate when another window is split")); | 1724 emsg(_(e_cannot_rotate_when_another_window_is_split)); |
1725 return; | 1725 return; |
1726 } | 1726 } |
1727 | 1727 |
1728 while (count--) | 1728 while (count--) |
1729 { | 1729 { |
2485 if (ERROR_IF_ANY_POPUP_WINDOW) | 2485 if (ERROR_IF_ANY_POPUP_WINDOW) |
2486 return FAIL; | 2486 return FAIL; |
2487 | 2487 |
2488 if (last_window()) | 2488 if (last_window()) |
2489 { | 2489 { |
2490 emsg(_("E444: Cannot close last window")); | 2490 emsg(_(e_cannot_close_last_window)); |
2491 return FAIL; | 2491 return FAIL; |
2492 } | 2492 } |
2493 | 2493 |
2494 if (win->w_closing || (win->w_buffer != NULL | 2494 if (win->w_closing || (win->w_buffer != NULL |
2495 && win->w_buffer->b_locked > 0)) | 2495 && win->w_buffer->b_locked > 0)) |
3661 && !bufIsChanged(wp->w_buffer)); | 3661 && !bufIsChanged(wp->w_buffer)); |
3662 } | 3662 } |
3663 } | 3663 } |
3664 | 3664 |
3665 if (message && !ONE_WINDOW) | 3665 if (message && !ONE_WINDOW) |
3666 emsg(_("E445: Other window contains changes")); | 3666 emsg(_(e_other_window_contains_changes)); |
3667 } | 3667 } |
3668 | 3668 |
3669 static void | 3669 static void |
3670 win_init_empty(win_T *wp) | 3670 win_init_empty(win_T *wp) |
3671 { | 3671 { |
4483 #ifdef FEAT_PROP_POPUP | 4483 #ifdef FEAT_PROP_POPUP |
4484 if (ERROR_IF_ANY_POPUP_WINDOW) | 4484 if (ERROR_IF_ANY_POPUP_WINDOW) |
4485 return; | 4485 return; |
4486 if (popup_is_popup(wp)) | 4486 if (popup_is_popup(wp)) |
4487 { | 4487 { |
4488 emsg(_("E366: Not allowed to enter a popup window")); | 4488 emsg(_(e_not_allowed_to_enter_popup_window)); |
4489 return; | 4489 return; |
4490 } | 4490 } |
4491 #endif | 4491 #endif |
4492 if (text_and_win_locked()) | 4492 if (text_and_win_locked()) |
4493 { | 4493 { |