Skip to content

Conversation

@phanen
Copy link
Contributor

@phanen phanen commented Jan 5, 2026

  • fix: some error when custom picker
  • fix: detect filetype from content when no filename is given

@phanen phanen force-pushed the custom-builtin-previewer branch from f64a823 to b7f887e Compare January 5, 2026 08:08
@phanen
Copy link
Contributor Author

phanen commented Jan 5, 2026

not sure if my commit related to the failure. will see it later.

@phanen phanen force-pushed the custom-builtin-previewer branch from 2b9b1df to 16dbabc Compare January 5, 2026 08:25
@phanen
Copy link
Contributor Author

phanen commented Jan 5, 2026

Author: zeertzjq <zeertzjq@outlook.com>
Date:   Sat Jan 3 17:55:07 2026 +0800

    fix(terminal): inconsistent mode change when switching buffer (#37215)
    
    Problem:  When switching to another terminal buffer in Terminal mode,
              usually Nvim stays in Terminal mode, but leaves Terminal mode
              if the old terminal buffer was deleted.
    Solution: Don't always leave Terminal mode when active terminal buffer
              is deleted. Instead let terminal_check_focus() decide that.

 src/nvim/terminal.c                           | 10 ++++++++--
 test/functional/terminal/ex_terminal_spec.lua | 30 +++++++++++++++++++++++++++++-
 2 files changed, 37 insertions(+), 3 deletions(-)

@phanen phanen force-pushed the custom-builtin-previewer branch 4 times, most recently from dbfab99 to 03ab3a7 Compare January 5, 2026 09:33
@phanen
Copy link
Contributor Author

phanen commented Jan 5, 2026

no better idea to fix, I just remove feedkey now.

@phanen phanen force-pushed the custom-builtin-previewer branch 3 times, most recently from 4a45754 to 3a97668 Compare January 6, 2026 02:03
@ibhagwan
Copy link
Owner

ibhagwan commented Jan 6, 2026

I see this will also close #2034.

btw, doesn’t seem like utils.ensure_startinsert is ever called.

@phanen phanen force-pushed the custom-builtin-previewer branch from 3a97668 to 7c37e46 Compare January 6, 2026 04:24
@phanen
Copy link
Contributor Author

phanen commented Jan 6, 2026

btw, doesn’t seem like utils.ensure_startinsert is ever called.

That still fail non-nightly test. Now only remove feedkey on nightly.

@ibhagwan
Copy link
Owner

ibhagwan commented Jan 6, 2026

Now that CI is fixed on nightly is this ready to be merged or you need more time?

@phanen phanen force-pushed the custom-builtin-previewer branch from f5169a1 to d459ec7 Compare January 6, 2026 07:32
phanen added 4 commits January 6, 2026 15:33
* error when fail to generate cache key
* error when fail to get title string
modeline, shebang, some regex pattern in diff pattern, etc.
@phanen phanen force-pushed the custom-builtin-previewer branch 3 times, most recently from 31206ec to f88d164 Compare January 7, 2026 05:38
@phanen
Copy link
Contributor Author

phanen commented Jan 7, 2026

fix some lint.

@ibhagwan
Copy link
Owner

ibhagwan commented Jan 7, 2026

fix some lint.

You feel this is ready to be merged?

I won’t be able to properly test and merge this in a couple of days as traveling, aiming to merge this Thursday

@phanen
Copy link
Contributor Author

phanen commented Jan 7, 2026

Yeah, if it have issue i can fix it quickly.

@ibhagwan
Copy link
Owner

ibhagwan commented Jan 7, 2026

Yeah, if it have issue i can fix it quickly.

Alright I’ll merge it then, the start insert commit fixes #1659 (comment).

@phanen phanen force-pushed the custom-builtin-previewer branch 2 times, most recently from fd242bc to a7ba16d Compare January 7, 2026 07:18
@phanen phanen force-pushed the custom-builtin-previewer branch from a7ba16d to 2150452 Compare January 7, 2026 07:22
phanen added 3 commits January 7, 2026 15:52
not sure what this commit does, but I think this commit won't change the
behavior
ibhagwan@383e605
window-local winblend won't change in other buffer
@phanen phanen force-pushed the custom-builtin-previewer branch 2 times, most recently from 41d0827 to c83a02a Compare January 9, 2026 08:49
@phanen
Copy link
Contributor Author

phanen commented Jan 9, 2026

The latest 2 commit was to fix some window option issue. (just lazy to open another pr as usual...).

@phanen
Copy link
Contributor Author

phanen commented Jan 9, 2026

preview window still use "global" option, which means it will be inherit by new split window, and switched buffer. since it has issue like #2266.

Maybe this can also be fixed, but it's unusual to split a window from previewer, so let it as is.

@phanen phanen force-pushed the custom-builtin-previewer branch 2 times, most recently from e9cfd23 to 386d0a8 Compare January 9, 2026 09:01
preview window still use "global" option, which means it will be inherit
by new split window, and switched buffer. since it has issue like ibhagwan#2266

Maybe this can also be fixed, but it's unusual to split a window from
previewer, so let it as is.
@phanen phanen force-pushed the custom-builtin-previewer branch from 386d0a8 to a939149 Compare January 9, 2026 10:43
@ibhagwan
Copy link
Owner

Thank you @phanen for these great changes.

Regarding the commit 383e605, say we had a complex regex in live grep and there are some discrepencies between the rg regex and vim.regex the reg:match_line could fail in which case we lose the exact highlighting of the match, the fallback makes it so that if we know the column (from the rg output directly) we can at least highlight one character where the match should begin.

For example say we search for fzf-lua and the result is in init.lua:1:10 (line 1 col 10) and for the sake of this example assume the regex match fails. we now highlight the first letter [f]zf-lua (instead of the entire string) so we can focus where the match begins.

This is also somewhat of a legacy since this is how live grep highlighting worked before the regex matching: cursor line to focus on the correct line, cursor char to focus on the right column.

@ibhagwan ibhagwan merged commit b8d1356 into ibhagwan:main Jan 10, 2026
8 checks passed
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.

2 participants