Skip to content

Commit

Permalink
feat: add option to toggle smear in terminal mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sphamba committed Feb 10, 2025
1 parent 110f7d8 commit 2f4a92a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/smear_cursor/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ M.vertical_bar_cursor_insert_mode = true
-- Smear cursor in replace mode.
M.smear_replace_mode = false

-- Smear cursor in terminal mode.
-- If the smear goes to the wrong location when enabled, try increasing `delay_after_key`.
M.smear_terminal_mode = false

-- Set to `true` if your cursor is a horizontal bar in replace mode.
M.horizontal_bar_cursor_replace_mode = true

Expand Down
1 change: 1 addition & 0 deletions lua/smear_cursor/events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ local function move_cursor(trigger, jump)
local mode = vim.api.nvim_get_mode().mode

if mode == "R" and not config.smear_replace_mode then jump = true end
if mode == "t" and not config.smear_terminal_mode then jump = true end

if mode ~= "c" then
row, col = screen.get_screen_cursor_position()
Expand Down

0 comments on commit 2f4a92a

Please sign in to comment.