Skip to content

fix: handle newer nvim's error message - #556

Merged
lambdalisue merged 1 commit into
lambdalisue:mainfrom
sevenc-nanashi:fix/newer-nvim-cursor-error
Oct 5, 2026
Merged

lambdalisue merged 1 commit into
lambdalisue:mainfrom
sevenc-nanashi:fix/newer-nvim-cursor-error

Conversation

@sevenc-nanashi

@sevenc-nanashi sevenc-nanashi commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

In newer nvim, nvim_win_set_cursor raises "Invalid cursor line: out of range" error message. This PR fixes to handle them.

Summary by CodeRabbit

  • Bug Fixes
    • Cursor position remains unchanged when Neovim reports that the cursor line is out of range or outside the buffer.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 6df5a73c-4030-4d81-911f-5b5ebb4d22e3

📥 Commits

Reviewing files that changed from the base of the PR and between fd03997 and c67763f.

📒 Files selected for processing (1)
  • autoload/vital/_fern/Vim/Window/Cursor.vim

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The Neovim cursor setter now also suppresses Invalid cursor line: out of range. Both this error and Cursor position outside buffer leave the cursor unchanged.

Changes

Cursor error handling

Layer / File(s) Summary
Suppress out-of-range errors
autoload/vital/_fern/Vim/Window/Cursor.vim
The nvim_win_set_cursor error handler now also suppresses Invalid cursor line: out of range.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to c6776

The additional Neovim error is handled, and inspection found no concrete user-facing failure from leaving the cursor unchanged.

Architecture Summary

Architecture risk: 🔵 Low · up to c6776

The change affects 1 system.

Changed systems: autoload

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — autoload (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in autoload/vital/_fern/Vim/Window/Cursor.vim: The nvim_win_set_cursor error handler now also suppresses Invalid cursor line: out of range; previously it caught only Cursor position outside buffer.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the change to handle newer Neovim error messages. It matches the main purpose of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lambdalisue
lambdalisue merged commit eaf8395 into lambdalisue:main Oct 5, 2026
13 checks passed
@lambdalisue

Copy link
Copy Markdown
Owner

Thanks 🎉

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