aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-10 06:18:59 -0400
committerJustin M. Keyes <justinkz@gmail.com>2019-06-10 12:18:59 +0200
commit3e58e60568c2acc765f3ee72295e2f15baa3cf52 (patch)
treea63f42c45a6e2e10a2e44dc395231f6a2ac022cd
parent7612dd3f8a47e25d421ce7605a165f504e5fa5a4 (diff)
downloadrneovim-3e58e60568c2acc765f3ee72295e2f15baa3cf52.tar.gz
rneovim-3e58e60568c2acc765f3ee72295e2f15baa3cf52.tar.bz2
rneovim-3e58e60568c2acc765f3ee72295e2f15baa3cf52.zip
vim-patch:8.0.1278: Add the "k" flag in 'guioptions' #10175
Problem: GUI window always resizes when adding/removing a scrollbar, toolbar, etc. Solution: Add the 'k' flag in 'guioptions' to keep the GUI window size and change the number of lines/columns instead. (Ychin, closes vim/vim#703) https://github.com/vim/vim/commit/8ac441576fd219fb7227349e228d5b68520b204a
-rw-r--r--runtime/doc/options.txt8
-rw-r--r--src/nvim/option_defs.h45
2 files changed, 30 insertions, 23 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index e780dba53c..a0adf7ec20 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -2948,7 +2948,13 @@ A jump table for the options with a short description can be found at |Q_op|.
the right moment, try adding this flag. This must be done
before starting the GUI. Set it in your |gvimrc|. Adding or
removing it after the GUI has started has no effect.
-
+ *'go-k'*
+ 'k' Keep the GUI window size when adding/removing a scrollbar, or
+ toolbar, tabline, etc. Instead, the behavior is similar to
+ when the window is maximized and will adjust 'lines' and
+ 'columns' to fit to the window. Without the 'k' flag Vim will
+ try to keep 'lines' and 'columns the same when adding and
+ removing GUI components.
*'guitablabel'* *'gtl'*
'guitablabel' 'gtl' string (default empty)
diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h
index a9f44976c9..f9f2a7d5dc 100644
--- a/src/nvim/option_defs.h
+++ b/src/nvim/option_defs.h
@@ -181,28 +181,29 @@ enum {
0, \
})
-/* characters for p_go: */
-#define GO_ASEL 'a' /* autoselect */
-#define GO_ASELML 'A' /* autoselect modeless selection */
-#define GO_BOT 'b' /* use bottom scrollbar */
-#define GO_CONDIALOG 'c' /* use console dialog */
-#define GO_TABLINE 'e' /* may show tabline */
-#define GO_FORG 'f' /* start GUI in foreground */
-#define GO_GREY 'g' /* use grey menu items */
-#define GO_HORSCROLL 'h' /* flexible horizontal scrolling */
-#define GO_ICON 'i' /* use Vim icon */
-#define GO_LEFT 'l' /* use left scrollbar */
-#define GO_VLEFT 'L' /* left scrollbar with vert split */
-#define GO_MENUS 'm' /* use menu bar */
-#define GO_NOSYSMENU 'M' /* don't source system menu */
-#define GO_POINTER 'p' /* pointer enter/leave callbacks */
-#define GO_ASELPLUS 'P' /* autoselectPlus */
-#define GO_RIGHT 'r' /* use right scrollbar */
-#define GO_VRIGHT 'R' /* right scrollbar with vert split */
-#define GO_TOOLBAR 'T' /* add toolbar */
-#define GO_FOOTER 'F' /* add footer */
-#define GO_VERTICAL 'v' /* arrange dialog buttons vertically */
-#define GO_ALL "aAbcefFghilmMprTv" /* all possible flags for 'go' */
+// characters for p_go:
+#define GO_ASEL 'a' // autoselect
+#define GO_ASELML 'A' // autoselect modeless selection
+#define GO_BOT 'b' // use bottom scrollbar
+#define GO_CONDIALOG 'c' // use console dialog
+#define GO_TABLINE 'e' // may show tabline
+#define GO_FORG 'f' // start GUI in foreground
+#define GO_GREY 'g' // use grey menu items
+#define GO_HORSCROLL 'h' // flexible horizontal scrolling
+#define GO_ICON 'i' // use Vim icon
+#define GO_LEFT 'l' // use left scrollbar
+#define GO_VLEFT 'L' // left scrollbar with vert split
+#define GO_MENUS 'm' // use menu bar
+#define GO_NOSYSMENU 'M' // don't source system menu
+#define GO_POINTER 'p' // pointer enter/leave callbacks
+#define GO_ASELPLUS 'P' // autoselectPlus
+#define GO_RIGHT 'r' // use right scrollbar
+#define GO_VRIGHT 'R' // right scrollbar with vert split
+#define GO_TOOLBAR 'T' // add toolbar
+#define GO_FOOTER 'F' // add footer
+#define GO_VERTICAL 'v' // arrange dialog buttons vertically
+#define GO_KEEPWINSIZE 'k' // keep GUI window size
+#define GO_ALL "aAbcefFghilmMprTvk" // all possible flags for 'go'
/* flags for 'comments' option */
#define COM_NEST 'n' /* comments strings nest */