Skip to content

Commit

Permalink
fix #609: only focus results viewer if data (#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
tconbeer authored Aug 15, 2024
1 parent 6179da6 commit 492c524
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
### Bug Fixes

- Fixes an issue where uncommenting a line using the uncomment action could indent the line by an additional space ([#616](https://github.com/tconbeer/harlequin/issues/616) - thank you [@harrymconner](https://github.com/harrymconner)!).
- The (empty) results viewer will no longer be focused after executing only DDL queries (queries that do not return any data) ([#609](https://github.com/tconbeer/harlequin/issues/609)).

## [1.23.1] - 2024-07-23

Expand Down
3 changes: 2 additions & 1 deletion src/harlequin/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,8 @@ async def load_tables(self, message: ResultsFetched) -> None:
self.results_viewer.show_table(did_run=False)
else:
self.results_viewer.show_table(did_run=True)
self.results_viewer.focus()
if message.data:
self.results_viewer.focus()

@on(WidgetMounted)
def bind_keys(self, message: WidgetMounted) -> None:
Expand Down

0 comments on commit 492c524

Please sign in to comment.