Repository navigation
Add zoom shortcuts and an option to comment lines by clicking their number - #4249
Open
deepsidhu1313 wants to merge 2 commits into
Open
deepsidhu1313 wants to merge 2 commits into
deepsidhu1313 wants to merge 2 commits into
Conversation
QScintilla only binds Ctrl++ and Ctrl+- to zooming. On keyboards where the plus sign needs Shift (Ctrl+Shift+= on a US layout, Cmd+Shift+; on a Japanese Mac) the Shift modifier is sent along, so that binding never matches and there was no keyboard way to zoom in at all. Ctrl+= did not work either. There was also no way back to the normal size except opening a new tab. Add Ctrl+Shift++ and Ctrl+= as additional ways to zoom in, and Ctrl+Shift+0 to reset the zoom. Ctrl+0 would be the usual shortcut for the latter, but it is already taken by View > Window Layout > Reset Window Layout in the main window, so the editors must not claim it. The shortcuts are widget shortcuts of ExtendedScintilla, so they also apply to the Edit Cell editor and don't clash between multiple editors. Add test-sql-editor, which creates editors offscreen and checks the zoom keys by sending key events, including that Ctrl+0 is left alone. Related: sqlitebrowser#2929
…itors Commenting out a line to switch between alternative conditions is a common thing to do while writing queries. That works with Ctrl+/ or the toolbar button, but a click on the line number would be quicker. By default such a click selects the whole line, and the same goes for dragging over several line numbers or Shift+click to extend the selection, so changing that for everybody would take something away. Add the option "Toggle comment on line number click" to the SQL tab of the preferences, which is off by default, so nothing changes unless it is turned on. A sensitive margin takes over all clicks on it, so the margin is only made sensitive in editors where there is something to comment. Read-only editors, like the SQL log, and the editor for the content of a cell, which does not hold SQL code, keep selecting the line. To do this, split the part of toggleBlockComment that works on a range of lines into toggleLineComments, which toggleBlockComment still uses after working out the lines from the selection. Add tests to test-sql-editor for toggleBlockComment, toggleLineComments and clicking on the line numbers. Related: sqlitebrowser#2996
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two independent commits.
Refs #2929, #2996