JS: use slice() instead of splice()
slice() does the same as splice() without the unintended effect of transforming the array.
This commit is contained in:
@@ -36,7 +36,7 @@ Rectangle {
|
||||
|
||||
readonly property int deleteCharsOnBackspace:
|
||||
lineTextUntilCursor.match(/^ +$/) ?
|
||||
lineTextUntilCursor.match(/ {1,4}/g).splice(-1)[0].length :
|
||||
lineTextUntilCursor.match(/ {1,4}/g).slice(-1)[0].length :
|
||||
1
|
||||
|
||||
// property var pr: lineTextUntilCursor
|
||||
|
Reference in New Issue
Block a user