Closed Frederick888 closed 2 years ago
require('smart-splits').setup({ resize_mode_silent = true })
@mrjones2014 That triggers an early return and then nothing gets printed to the command area. I still want the message, but just one line instead of two duplicate lines... 😅
I guess I'm confused 😅
You want a vim.notify
or a print
but not both? Is that what you're saying?
@mrjones2014 Yes. Currently they look like this in my Neovim (cmdheight
= 2):
And if I set cmdheight
to 1:
Oh, it should only print once. It's only printing once for me, regardless of cmdheight
.
How are you triggering it? Can you share your config?
Minimal vimrc:
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
call plug#begin('~/.vim/plugged')
Plug 'mrjones2014/smart-splits.nvim'
call plug#end()
set nocompatible
set updatetime=300
set cmdheight=2
I started persistent mode by directly :SmartResizeMode
.
Neovim version:
NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Ah, I think I just didn't realize because I'm using a notifications plugin for Neovim. Without one, vim.notify
and print
both go to the command area.
I'll remove the print
and leave just the vim.notify
.
Without any special overriding of vim.notify(), [1][2] just appear to be two duplicate lines when
cmdheight
> 1.I wonder if it's ok to remove the print() calls? Or if this was intentional, can we have an option to suppress it? Thank you.
[1] https://github.com/mrjones2014/smart-splits.nvim/blob/884172034a55ef4ee4fdddc0a1cbb09c767ac032/lua/smart-splits/resize-mode.lua#L26-L27 [2] https://github.com/mrjones2014/smart-splits.nvim/blob/884172034a55ef4ee4fdddc0a1cbb09c767ac032/lua/smart-splits/resize-mode.lua#L43-L44