mirror of
https://github.com/James-Yu/LaTeX-Workshop.git
synced 2024-10-05 15:50:41 +03:00
Don't match empty before / after selection
This commit is contained in:
parent
4d4333dd50
commit
0b6c21feb6
@ -300,9 +300,9 @@ export class Locator {
|
||||
// columns are typically not supplied by SyncTex, this could change in the future for some engines though
|
||||
if (col === 0) {
|
||||
const line = doc.lineAt(row)
|
||||
if (line.text.indexOf(data.textBeforeSelection) > -1) {
|
||||
if (data.textBeforeSelection !== '' && line.text.indexOf(data.textBeforeSelection) > -1) {
|
||||
col = line.text.indexOf(data.textBeforeSelection) + data.textBeforeSelection.length
|
||||
} else if (line.text.indexOf(data.textAfterSelection) > -1) {
|
||||
} else if (data.textAfterSelection !== '' && line.text.indexOf(data.textAfterSelection) > -1) {
|
||||
col = line.text.indexOf(data.textAfterSelection)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user