Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: CocTagFunc jumps to wrong position if using tabs for indentation
From LSP specification, Position.character indicates the character offset on a line in a document (zero-based) [1]. However, `|` in vim will jump to screen column [2]. If the file (e.g., linux kernel source code) uses tabs for indentation, then CocTagFunc will jump to a wrong position. We can fix it by changing to use `cursor()`, whose col argument means the byte-count column. 1. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position 2. https://vimdoc.sourceforge.net/htmldoc/motion.html#bar Signed-off-by: Adam Tao <[email protected]>
- Loading branch information