From ec53d43f844149f191ae23300db663436eda6d72 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 24 Nov 2020 19:34:48 -0500 Subject: vim-patch:8.2.2041: haskell filetype not optimally recognized Problem: Haskell filetype not optimally recognized. Solution: Recognize all *.hsc files as Haskell. (Marcin Szamotulski, closes vim/vim#7354) https://github.com/vim/vim/commit/a09bee322e605c8a076fa23c3d3259495a1129d2 --- runtime/filetype.vim | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'runtime') diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 4e54bcaefd..b9d2a43d5d 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -693,15 +693,9 @@ au BufNewFile,BufRead *.haml setf haml " Hamster Classic | Playground files au BufNewFile,BufRead *.hsm setf hamster -au BufNewFile,BufRead *.hsc - \ if match(join(getline(1,10), "\n"), '\%(^\|\n\)\s*\%({-#\_s*LANGUAGE\>\|\\)') != -1 | - \ setf haskell | - \ else | - \ setf hamster | - \ endif " Haskell -au BufNewFile,BufRead *.hs,*.hs-boot setf haskell +au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot setf haskell au BufNewFile,BufRead *.lhs setf lhaskell au BufNewFile,BufRead *.chs setf chaskell au BufNewFile,BufRead cabal.project setf cabalproject -- cgit From ede747c2cc84382e8746df8992ef0e403647ffde Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 25 Nov 2020 01:32:48 -0500 Subject: vim-patch:8.2.0257: cannot recognize a terminal in a popup window Problem: Cannot recognize a terminal in a popup window. Solution: Add the win_gettype() function. https://github.com/vim/vim/commit/00f3b4e007af07870168bf044cecc9d544483953 --- runtime/doc/eval.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'runtime') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 7c6013f1b2..43c6bd6918 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2487,6 +2487,7 @@ wait({timeout}, {condition}[, {interval}]) wildmenumode() Number whether 'wildmenu' mode is active win_findbuf({bufnr}) List find windows containing {bufnr} win_getid([{win} [, {tab}]]) Number get |window-ID| for {win} in {tab} +win_gettype([{nr}]) String type of window {nr} win_gotoid({expr}) Number go to |window-ID| {expr} win_id2tabwin({expr}) List get tab and window nr from |window-ID| win_id2win({expr}) Number get window nr from |window-ID| @@ -9277,6 +9278,21 @@ win_getid([{win} [, {tab}]]) *win_getid()* number {tab}. The first tab has number one. Return zero if the window cannot be found. +win_gettype([{nr}]) *win_gettype()* + Return the type of the window: + "popup" popup window |popup| + "command" command-line window |cmdwin| + (empty) normal window + "unknown" window {nr} not found + + When {nr} is omitted return the type of the current window. + When {nr} is given return the type of this window by number or + |window-ID|. + + Also see the 'buftype' option. When running a terminal in a + popup window then 'buftype' is "terminal" and win_gettype() + returns "popup". + win_gotoid({expr}) *win_gotoid()* Go to window with ID {expr}. This may also change the current tabpage. -- cgit From 9b2efe6b7d40d6ef317751768a65c74e4e2e8152 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 25 Nov 2020 02:27:10 -0500 Subject: vim-patch:8.2.0991: cannot get window type for autocmd and preview window Problem: Cannot get window type for autocmd and preview window. Solution: Add types to win_gettype(). (Yegappan Lakshmanan, closes vim/vim#6277) https://github.com/vim/vim/commit/0fe937fd8616fcd24b1b1ef2ab9f1657615dd22c Cherry-pick test_preview.vim,test_window_cmd.vim changes from patch v8.2.0522. --- runtime/doc/eval.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 43c6bd6918..57d9eb5b43 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -9280,7 +9280,10 @@ win_getid([{win} [, {tab}]]) *win_getid()* win_gettype([{nr}]) *win_gettype()* Return the type of the window: + "aucmdwin" autocommand window. Temporary window + used to execute autocommands. "popup" popup window |popup| + "preview" preview window |preview-window| "command" command-line window |cmdwin| (empty) normal window "unknown" window {nr} not found -- cgit From 8d7fa8962bce98936cf9ddcefd70f35e7db04239 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 25 Nov 2020 02:43:23 -0500 Subject: vim-patch:8.2.0996: using "aucmdwin" in win_gettype() is not ideal Problem: Using "aucmdwin" in win_gettype() is not ideal. Solution: Rename to "autocmd". https://github.com/vim/vim/commit/40a019f157c549dcdc17c33f082975485567bb06 --- runtime/doc/eval.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 57d9eb5b43..343e35bf66 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -9280,7 +9280,7 @@ win_getid([{win} [, {tab}]]) *win_getid()* win_gettype([{nr}]) *win_gettype()* Return the type of the window: - "aucmdwin" autocommand window. Temporary window + "autocmd" autocommand window. Temporary window used to execute autocommands. "popup" popup window |popup| "preview" preview window |preview-window| -- cgit