mirror of
https://github.com/James-Yu/LaTeX-Workshop.git
synced 2024-10-04 15:17:59 +03:00
Merge pull request #901 from tamuratak/fix_cursor_render
not render cursor at the beginning and at the end
This commit is contained in:
commit
08e8ed9f71
@ -186,7 +186,7 @@ export class HoverProvider implements vscode.HoverProvider {
|
||||
if (color !== 'auto') {
|
||||
sym = `{\\color{${color}}${symbol}}`
|
||||
}
|
||||
if (range.contains(cursor)) {
|
||||
if (range.contains(cursor) && !range.start.isEqual(cursor) && !range.end.isEqual(cursor)) {
|
||||
return document.getText( new vscode.Range(range.start, cursor) ) + sym + document.getText( new vscode.Range(cursor, range.end))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user