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

cursor is not drawn correctly with 'nowrap' and when moving cursor below a line containing virtual text #10909

Closed
bfrg opened this issue Aug 13, 2022 · 0 comments
Labels

Comments

@bfrg
Copy link
Contributor

bfrg commented Aug 13, 2022

Steps to reproduce

Run vim --clean test.vim -S test.vim, with

vim9script

colorscheme habamax
set cursorline
set nowrap

prop_type_add('Prop1', {highlight: 'Error'})
prop_type_add('Prop2', {highlight: 'Search'})

prop_add(3, 0, {
    type: 'Prop1',
    text: 'The quick brown fox jumps over the lazy dog',
    text_align: 'right'
})

prop_add(3, 0, {
    type: 'Prop2',
    text: 'The quick brown fox jumps over the lazy dog',
    text_align: 'right'
})

Results

  1. When the cursor is moved below a line that contains virtual text, the cursorline is not drawn correctly.
  2. In visual mode, the cursor is not located at the lowest selected line.

Screenshots
screenshot-2022-08-13_175508
screenshot-2022-08-13_175518

Expected behaviour

cursor and visual selection should always be drawn correctly.

Version of Vim

9.0.199

Environment

Linux

Logs and stack traces

No response

@bfrg bfrg added the bug label Aug 13, 2022
brammool added a commit that referenced this issue Aug 13, 2022
…rops

Problem:    cursor in a wrong positoin if 'wrap' is off and using two right
            aligned text props in one line.
Solution:   Count an extra line for a right aligned text property after a
            below or right aligned text property. (issue #10909)
jamespeapen pushed a commit to jamespeapen/vim that referenced this issue Sep 21, 2022
…rops

Problem:    cursor in a wrong positoin if 'wrap' is off and using two right
            aligned text props in one line.
Solution:   Count an extra line for a right aligned text property after a
            below or right aligned text property. (issue vim#10909)
jamespeapen pushed a commit to jamespeapen/vim that referenced this issue Sep 21, 2022
Problem:    CursorLine highlight overrules virtual text highlight.
Solution:   Let extra attribute overrule line attribute. (closes vim#10909)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant