main: allow running partial query by selection
This commit is contained in:
parent
3a4bdbde94
commit
db5f6816c5
7
main.go
7
main.go
@ -263,6 +263,11 @@ func (f *TMainForm) OnQueryExecute(sender vcl.IObject) {
|
||||
return
|
||||
}
|
||||
|
||||
queryString := f.queryInput.Text()
|
||||
if f.queryInput.SelLength() > 0 {
|
||||
queryString = f.queryInput.SelText() // Just the selected text
|
||||
}
|
||||
|
||||
// Execute
|
||||
node := f.Buckets.Selected()
|
||||
if node == nil {
|
||||
@ -271,7 +276,7 @@ func (f *TMainForm) OnQueryExecute(sender vcl.IObject) {
|
||||
}
|
||||
|
||||
ndata := (*navData)(node.Data())
|
||||
ndata.ld.ExecQuery(f.queryInput.Text(), f.queryResult)
|
||||
ndata.ld.ExecQuery(queryString, f.queryResult)
|
||||
}
|
||||
|
||||
func (f *TMainForm) OnNavChange(sender vcl.IObject, node *vcl.TTreeNode) {
|
||||
|
Loading…
Reference in New Issue
Block a user