mirror of
https://github.com/wassname/nvatom.git
synced 2026-07-10 00:30:20 +08:00
Make the searching query to be the non-selected text, not the full text
For example, if we have two notes "Car" and "Care", when we type "Ca", then it automatically fills "Care" and drops "Car". (Assume "Care" comes ahead of "Car"). However, we still want to search with "Ca".
This commit is contained in:
@@ -115,6 +115,12 @@ class NotationalVelocityView extends SelectListView
|
||||
hide: ->
|
||||
@panel?.hide()
|
||||
|
||||
getFilterQuery: ->
|
||||
editor = @filterEditorView.model
|
||||
fullText = editor.getText()
|
||||
selectedText = editor.getSelectedText()
|
||||
return fullText.substring(0, fullText.length - selectedText.length)
|
||||
|
||||
populateList: ->
|
||||
filterQuery = @getFilterQuery()
|
||||
filteredItems = null
|
||||
|
||||
Reference in New Issue
Block a user