-
Notifications
You must be signed in to change notification settings - Fork 119
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
Raise end-index by 1 when setting parts of Range #270
Conversation
I checked the failed checks of CI, it's flake complaints unrelated to this PR, therefore I'd say this should be ready for merge nevertheless. All tests run through. |
could a test be added to |
Certainly so. Done. |
This commit fixes a bug in Range, leading to the last line of a Range not being able to be replaced via the __setitem__-function as the final line setting its contents in the buffer the Range is based on assumes the end-index to be inclusive, which it isn't in Python-slicing-notation.
PR is updated, One thing that's still bugging me: I cannot reproduce a similar behavior for |
@bfredl So if the test is sufficient for you, the PR is final and ready for merge. |
Brings the client up-to-date with Nvim 0.2.1 Changes since 0.1.13: * a2e1169 Fix tests on windows (neovim#201) * 9a0e729 fix an indexing bug when setting lines in a Range object (neovim#270) * 4abd5d0 Documentation update (neovim#272) * a703b47 make sure logging always uses UTF-8 regardless of locale (neovim#276) * 68aa352 argument to allow nested notification handlers (neovim#262)
Brings the client up-to-date with Nvim 0.2.1 Changes since 0.1.13: * a2e1169 Fix tests on windows (neovim#201) * 9a0e729 Fix an indexing bug when setting lines in a Range object (neovim#270) * 4abd5d0 Documentation update (neovim#272) * a703b47 Make sure logging always uses UTF-8 regardless of locale (neovim#276) * 68aa352 Argument to allow nested notification handlers (neovim#262)
Brings the client up-to-date with Nvim 0.2.1 Changes since 0.1.13: * a2e1169 Fix tests on windows (neovim#201) * 9a0e729 Fix an indexing bug when setting lines in a Range object (neovim#270) * 4abd5d0 Documentation update (neovim#272) * a703b47 Make sure logging always uses UTF-8 regardless of locale (neovim#276) * 68aa352 Add argument to allow nested notification handlers (neovim#262)
This commit fixes a bug in Range, leading to the last line of a Range
not being able to be replaced via
__setitem__
as the finalline setting its contents in the buffer the Range is based on assumes the
end-index to be inclusive, which it isn't in Python-slicing-notation.
@justinmk