aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-11-25 22:48:53 -0500
committerGitHub <noreply@github.com>2020-11-25 22:48:53 -0500
commit4537ff659efbc65f4c94b88cce8fb3c39d03aae5 (patch)
tree50dc58f07bc9f3b05b1635fac63aff30e9d23e1e /runtime
parentdd00c74737241945187e3e0b939d289af25e505e (diff)
parentfe5dc266483aa4878b30ecc660b5401648545f27 (diff)
downloadrneovim-4537ff659efbc65f4c94b88cce8fb3c39d03aae5.tar.gz
rneovim-4537ff659efbc65f4c94b88cce8fb3c39d03aae5.tar.bz2
rneovim-4537ff659efbc65f4c94b88cce8fb3c39d03aae5.zip
Merge pull request #13375 from janlazo/vim-8.2.2041
vim-patch:8.1.{2290,2390},8.2.{242,257,302,303,462,991,996,2041,2042,2043,2047,2048,2049,2054}
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt19
-rw-r--r--runtime/filetype.vim8
2 files changed, 20 insertions, 7 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 7c6013f1b2..343e35bf66 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,24 @@ 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:
+ "autocmd" 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
+
+ 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.
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\>\|\<module\>\)') != -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