mirror of
https://github.com/neovim/neovim.git
synced 2025-12-14 18:35:47 +00:00
vim-patch:8.2.0115: byte2line() does not work correctly with text properties
Problem: Byte2line() does not work correctly with text properties. (Billie
Cleek)
Solution: Take the bytes of the text properties into account.
(closes vim/vim#5334)
9df53b62de
Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit 7048c36ba8)
This commit is contained in:
committed by
github-actions[bot]
parent
7159a0192b
commit
03f9df8117
@@ -4021,9 +4021,12 @@ int ml_find_line_or_offset(buf_T *buf, linenr_T lnum, int *offp, bool no_ff)
|
||||
}
|
||||
} else {
|
||||
extra = 0;
|
||||
while (offset >= size
|
||||
+ text_end - (int)((dp->db_index[idx]) & DB_INDEX_MASK)
|
||||
+ ffdos) {
|
||||
while (true) {
|
||||
if (!(offset >= size
|
||||
+ text_end - (int)((dp->db_index[idx]) & DB_INDEX_MASK)
|
||||
+ ffdos)) {
|
||||
break;
|
||||
}
|
||||
if (ffdos) {
|
||||
size++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user