Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to disable lens using customized function. #33

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ipod825
Copy link
Contributor

@ipod825 ipod825 commented Apr 25, 2020

No description provided.

ipod825 added 5 commits April 24, 2020 20:26
First, the original autocommand for WinNew doesn't do anything. The
second WinNew autocmd overrides the first one and hence
g:lens#enter_disables is never set to 1. Second, if we don't want to
have lens#win_enter be called. Then no WinNew autocmd already achieves
that. So the current WinNew autocmd is totally redundant.
This is useful for people using different screen resolution.
As pointed out in this [comment](camspiers#12 (comment)),
WinEnter autocmd failed to detect the new window properties in some
situation. This commit use timer_start to delay the callback of WinEnter
to ensure that the new window properties are correctly detected.
The problem is that if a window is diabled, surely we don't resize any
window when we enter it. However, when we enter another window that is
not disabled, now the disabled window will be resized. And when we jump
back, it won't be resized back as it is disabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant