aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByron Torres <b@torresjrjr.com>2023-05-24 13:15:45 +0100
committerByron Torres <b@torresjrjr.com>2023-05-24 15:28:58 +0100
commitdac78bc4593bf2dfce23e51b3033cffdf87010cd (patch)
tree2cfe16300bb34e25cf761d368debfdd1574a5329
parentmend blank popups (diff)
downloadvim-haredoc-dac78bc4593bf2dfce23e51b3033cffdf87010cd.tar.gz
fix, don't try use statements in non-file buffers
-rw-r--r--plugin/haredoc.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/haredoc.vim b/plugin/haredoc.vim
index 2ab9695..73a4dac 100644
--- a/plugin/haredoc.vim
+++ b/plugin/haredoc.vim
@@ -16,7 +16,7 @@ function Haredoc(symbol)
let &iskeyword = oldiskeyword
" resolve possibly partial symbols (chrono::moment)
- if match(symbol, "::") != -1
+ if match(symbol, "::") != -1 && &buftype == ''
let [parent, base] = split(symbol, "::")[-2:-1]
" try joining symbol with a use statement.