Mercurial > vim
comparison src/screen.c @ 30825:c7983f593fa7 v9.0.0747
patch 9.0.0747: too many #ifdefs
Commit: https://github.com/vim/vim/commit/ba43e76fcd5b2da57dbaa4d9a555793fe8ac344e
Author: Martin Tournoij <martin@arp242.net>
Date: Thu Oct 13 22:12:15 2022 +0100
patch 9.0.0747: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Gradudate the +cmdline_info feature. (Martin Tournoij,
closes #11330)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 13 Oct 2022 23:15:05 +0200 |
parents | cf77f7a19ab6 |
children | 360f286b5869 |
comparison
equal
deleted
inserted
replaced
30824:b7f12666bbb4 | 30825:c7983f593fa7 |
---|---|
4418 { | 4418 { |
4419 msg_pos_mode(); | 4419 msg_pos_mode(); |
4420 msg_clr_eos(); | 4420 msg_clr_eos(); |
4421 } | 4421 } |
4422 | 4422 |
4423 #ifdef FEAT_CMDL_INFO | |
4424 // In Visual mode the size of the selected area must be redrawn. | 4423 // In Visual mode the size of the selected area must be redrawn. |
4425 if (VIsual_active) | 4424 if (VIsual_active) |
4426 clear_showcmd(); | 4425 clear_showcmd(); |
4427 | 4426 |
4428 // If the last window has no status line, the ruler is after the mode | 4427 // If the last window has no status line, the ruler is after the mode |
4429 // message and must be redrawn | 4428 // message and must be redrawn |
4430 if (redrawing() && lastwin->w_status_height == 0) | 4429 if (redrawing() && lastwin->w_status_height == 0) |
4431 win_redr_ruler(lastwin, TRUE, FALSE); | 4430 win_redr_ruler(lastwin, TRUE, FALSE); |
4432 #endif | 4431 |
4433 redraw_cmdline = FALSE; | 4432 redraw_cmdline = FALSE; |
4434 redraw_mode = FALSE; | 4433 redraw_mode = FALSE; |
4435 clear_cmdline = FALSE; | 4434 clear_cmdline = FALSE; |
4436 | 4435 |
4437 return length; | 4436 return length; |
4788 #define COL_RULER 17 // columns needed by standard ruler | 4787 #define COL_RULER 17 // columns needed by standard ruler |
4789 | 4788 |
4790 void | 4789 void |
4791 comp_col(void) | 4790 comp_col(void) |
4792 { | 4791 { |
4793 #if defined(FEAT_CMDL_INFO) | |
4794 int last_has_status = (p_ls == 2 || (p_ls == 1 && !ONE_WINDOW)); | 4792 int last_has_status = (p_ls == 2 || (p_ls == 1 && !ONE_WINDOW)); |
4795 | 4793 |
4796 sc_col = 0; | 4794 sc_col = 0; |
4797 ru_col = 0; | 4795 ru_col = 0; |
4798 if (p_ru) | 4796 if (p_ru) |
4799 { | 4797 { |
4800 # ifdef FEAT_STL_OPT | 4798 #ifdef FEAT_STL_OPT |
4801 ru_col = (ru_wid ? ru_wid : COL_RULER) + 1; | 4799 ru_col = (ru_wid ? ru_wid : COL_RULER) + 1; |
4802 # else | 4800 #else |
4803 ru_col = COL_RULER + 1; | 4801 ru_col = COL_RULER + 1; |
4804 # endif | 4802 #endif |
4805 // no last status line, adjust sc_col | 4803 // no last status line, adjust sc_col |
4806 if (!last_has_status) | 4804 if (!last_has_status) |
4807 sc_col = ru_col; | 4805 sc_col = ru_col; |
4808 } | 4806 } |
4809 if (p_sc) | 4807 if (p_sc) |
4816 ru_col = Columns - ru_col; | 4814 ru_col = Columns - ru_col; |
4817 if (sc_col <= 0) // screen too narrow, will become a mess | 4815 if (sc_col <= 0) // screen too narrow, will become a mess |
4818 sc_col = 1; | 4816 sc_col = 1; |
4819 if (ru_col <= 0) | 4817 if (ru_col <= 0) |
4820 ru_col = 1; | 4818 ru_col = 1; |
4821 #else | |
4822 sc_col = Columns; | |
4823 ru_col = Columns; | |
4824 #endif | |
4825 #ifdef FEAT_EVAL | 4819 #ifdef FEAT_EVAL |
4826 set_vim_var_nr(VV_ECHOSPACE, sc_col - 1); | 4820 set_vim_var_nr(VV_ECHOSPACE, sc_col - 1); |
4827 #endif | 4821 #endif |
4828 } | 4822 } |
4829 | 4823 |