Skip to content

Commit

Permalink
chore: changes event name
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgerojas26 committed Sep 8, 2024
1 parent 2305a74 commit 6e055df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions components/ResultsTable.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ func (table *ResultsTable) subscribeToEditorChanges() {

for stateChange := range ch {
switch stateChange.Key {
case eventSqlEditorQuery:
case eventSQLEditorQuery:
query := stateChange.Value.(string)
if query != "" {
queryLower := strings.ToLower(query)
Expand Down Expand Up @@ -590,7 +590,7 @@ func (table *ResultsTable) subscribeToEditorChanges() {
}
}
}
case eventSqlEditorEscape:
case eventSQLEditorEscape:
table.SetIsFiltering(false)
App.SetFocus(table)
table.HighlightTable()
Expand Down
4 changes: 2 additions & 2 deletions components/SQLEditor.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ func NewSQLEditor() *SQLEditor {
command := app.Keymaps.Group(app.EditorGroup).Resolve(event)

if command == commands.Execute {
sqlEditor.Publish(eventSqlEditorQuery, sqlEditor.GetText())
sqlEditor.Publish(eventSQLEditorQuery, sqlEditor.GetText())
return nil
} else if command == commands.UnfocusEditor {
sqlEditor.Publish(eventSqlEditorEscape, "")
sqlEditor.Publish(eventSQLEditorEscape, "")
} else if command == commands.OpenInExternalEditor && runtime.GOOS == "linux" {
// ----- THIS IS A LINUX-ONLY FEATURE, for now

Expand Down
4 changes: 2 additions & 2 deletions components/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const (
eventSidebarUnfocusing string = "UnfocusingSidebar"
eventSidebarToggling string = "TogglingSidebar"

eventSqlEditorQuery string = "Query"
eventSqlEditorEscape string = "Escape"
eventSQLEditorQuery string = "Query"
eventSQLEditorEscape string = "Escape"

eventResultsTableFiltering string = "FilteringResultsTable"

Expand Down

0 comments on commit 6e055df

Please sign in to comment.