mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 09:01:39 -05:00
Fix lint issues
This commit is contained in:
parent
dd535a4e32
commit
61c302e0c0
1 changed files with 4 additions and 3 deletions
|
@ -370,7 +370,7 @@ export const previous_line = wrap_input(
|
|||
(text,selectionStart) => {
|
||||
const leftNewLinePos = text.slice(0, selectionStart).lastIndexOf("\n")
|
||||
let width = 0
|
||||
if (~leftNewLinePos) {
|
||||
if (leftNewLinePos!==-1) {
|
||||
width = selectionStart - leftNewLinePos
|
||||
} else {
|
||||
return[text, 0, null]
|
||||
|
@ -390,7 +390,7 @@ export const next_line = wrap_input(
|
|||
(text, selectionStart) => {
|
||||
const leftNewLinePos = text.slice(0, selectionStart).lastIndexOf("\n")
|
||||
let width
|
||||
if (~leftNewLinePos) {
|
||||
if (leftNewLinePos!==-1) {
|
||||
width = selectionStart - leftNewLinePos
|
||||
} else {
|
||||
width=selectionStart+1
|
||||
|
@ -407,7 +407,8 @@ export const next_line = wrap_input(
|
|||
position=nextRightNewLinePos
|
||||
}
|
||||
}
|
||||
return [text, position, null]}
|
||||
return [text, position, null]
|
||||
}
|
||||
)
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue