mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-12-18 02:43:42 +00:00
massive qml edit
This commit is contained in:
@ -77,9 +77,9 @@ ScrollView {
|
||||
|
||||
function getLastTag() {
|
||||
// get substring to analyze
|
||||
var substring = textArea.getText(0, textArea.cursorPosition)
|
||||
const substring = textArea.getText(0, textArea.cursorPosition)
|
||||
// find last position of index in the given substring
|
||||
var signIndex = substring.lastIndexOf('$') + 1
|
||||
const signIndex = substring.lastIndexOf("$") + 1
|
||||
if ((signIndex === 0) || (signIndex === textArea.cursorPosition))
|
||||
return ""
|
||||
// get current tag text
|
||||
@ -89,6 +89,14 @@ ScrollView {
|
||||
function insert(text) {
|
||||
textArea.insert(textArea.cursorPosition, text)
|
||||
}
|
||||
|
||||
function removeSelection() {
|
||||
textArea.remove(textArea.selectionStart, textArea.selectionEnd)
|
||||
}
|
||||
|
||||
function selectedText() {
|
||||
return textArea.selectedText
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user