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

fix(hacks): cursor jumps in cmdline #937

Closed
wants to merge 1 commit into from
Closed

Conversation

piz-ewing
Copy link

@piz-ewing piz-ewing commented Aug 22, 2024

fix #931 #923

After setting the cursor of nvim__redraw to false.
the cursor no longer jumps, it works well for me.

@b0ae989c
Copy link
Contributor

LGTM. Tested on macOS 14.6.1 with

NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1724232689

@cjasaMHC
Copy link

Would you be willing to share the line of config to set redraw to false??

@piz-ewing
Copy link
Author

Would you be willing to share the line of config to set redraw to false??

you can get it in the commit, see here

@cjasaMHC
Copy link

Would you be willing to share the line of config to set redraw to false??

you can get it in the commit, see here

Thank you so much!!

@pacman314159
Copy link

Would you be willing to share the line of config to set redraw to false??

you can get it in the commit, see here

Would you be willing to share the line of config to set redraw to false??

you can get it in the commit, see here

that's really nice of u to fix that problem mate

thanks

@folke
Copy link
Owner

folke commented Sep 18, 2024

That cursor redraw is there for a reason, so I can't merge this.....

@folke folke closed this Sep 18, 2024
@folke folke reopened this Sep 18, 2024
@folke
Copy link
Owner

folke commented Sep 18, 2024

So it seems that this is probably the right fix afterall :)

I thought this was set to false in the cmdline code.

Will further debug and see if this is good to merge.

@folke folke linked an issue Sep 18, 2024 that may be closed by this pull request
4 tasks
@JustBarnt
Copy link

JustBarnt commented Sep 18, 2024

@folke I can confirm on Windows changing this to false as well fixes it. But strangely enough instead of changing cursor = false. Adding win = Cmdline.win() also fixes the issue.

Not sure what the correct fix per say is.

if not Util.is_search() then
  if vim.api.nvim__redraw then
      vim.api.nvim__redraw({ flush = true, cursor = true, win = Cmdline.win() })
    else
      vim.cmd.redraw()
    end
  end

@folke folke closed this in 3373ab5 Sep 18, 2024
folke pushed a commit that referenced this pull request Sep 18, 2024
🤖 I have created a release *beep* *boop*
---


## [4.5.1](v4.5.0...v4.5.1)
(2024-09-18)


### Bug Fixes

* dont redraw when exiting. Fixes
[#936](#936). Fixes
[#921](#921)
([8c6a024](8c6a024))
* **hacks:** dont close timer multiple times during exit
([86a4891](86a4891))
* **hacks:** only redraw cursor when cmdline is active. Fixes
[#950](#950). Fixes
[#937](#937). Fixes
[#923](#923)
([3373ab5](3373ab5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

bug: Cursor jumps in cmdline - 4.5.0 (MacOS + Wezterm) bug: Cursor flickering in cmdline
6 participants