Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upScrollbar position (in sql editor tab) resets after running a query #2073
Comments
|
In a current nightly only happens when the second query contains an error. I think that hasn't changed. I think that we only move the scroll when a statement fails. The problem is that we consider all the whitespace before a statement to be part of it, and when a statement has an error, we move the cursor to the beginning of it. I'll check whether there is an easy and clean solution for that. |
Tested Some new info: if db is marked as dirty, then scrollbar works as expected. To reproduce
Saving current scrollbar position? |
|
Thanks @T1mL3arn. There were two problems here:
The fixes are already committed and will be available in the tomorrow's nightly. Could you try again and report any pending problem? |
|
@mgrojo could you trigger windows build script(or whatever) so I can test new version ? |
|
The windows build script is triggered each midnight (around UTC) when there are changes in the repository. In https://nightlies.sqlitebrowser.org/latest/ you can find the results and according to https://nightlies.sqlitebrowser.org/win64/commit.txt and https://nightlies.sqlitebrowser.org/win32/commit.txt, they include the latest changes. |
|
Tested. Now db is not marked as dirty for queries with error. Wrong scroll behavior still remains for correct and incorrect queries. |
|
I'd need detail steps to reproduce it or if you could record a video, it'd be more easy to reproduce and analyse. |
QScintilla text(line) returns the string of the passed line including the line terminator. Given the differences in platforms in that regard, we only supported the case for a single character separator. This should solve issue #2073 for Windows. It also should solve #1768 and #1632, which were only reproduced in Windows or editing files with lines ending in "\r\n" in general.
|
@T1mL3arn thanks for the video. At first, I thought that you didn't have the fix, but then, I realized that we had problems with the "Execute Current Line" function in Windows, due to the line separator differences between platforms. I could finally reproduce it under Linux using a file with CR+LF endings. This was already reported in issues #1632 and #1768. Could you confirm with tomorrow's nightly that everything works as expected under Windows? |
See sqlitebrowser/sqlitebrowser#2073 details
|
Tested. Scroll behavior for incorrect queries is fixed. The wrong scroll behavior for correct queries is still there. Here is a new video. |
|
That is caused by the hourglass icon appearing and modifying the tab bar height. Maybe this could solve the problem: Another option is setting icons permanently in the tabs. The icon could indicate if the tab is an external file, an unsaved buffer or a saved tab in the project. Or only the saved or unsaved status of the tab. @MKleusberg, do you have any other idea? |
The icon shows whether the tab is linked to a project file (tab icon) or to a file in disk (document_open icon). This has a lateral effect of fixing this, since the tab always has an icon and the height of the tab bar never changes: #2073 (comment)
The icon shows whether the tab is linked to a project file (open_sql icon) or to a file in disk (document_open icon). This has a lateral effect of fixing this, since the tab always has an icon and the height of the tab bar never changes: #2073 (comment)
The icon shows whether the tab is linked to a project file (open_sql icon) or to a file in disk (document_open icon). This has a lateral effect of fixing this, since the tab always has an icon and the height of the tab bar never changes: #2073 (comment)
The icon shows whether the tab is linked to a project file (open_sql icon) or to a file in disk (document_open icon). This has a lateral effect of fixing this, since the tab always has an icon and the height of the tab bar never changes: #2073 (comment)
|
@T1mL3arn This is supposed to be fixed in our release 3.12.0. Could you please confirm and close this issue? |
|
@mgrojo Checked 3.12.0, It works the same as described in the post above, i.e. it is still broken. |
|
It was supposed to be solved by having always an icon in the tab. I cannot reproduce it in Linux, which is my development platform, so I'm kind of blind trying to solve this. Maybe someone else can provide some insight. |
|
@MKleusberg Thoughts on this one too? |
Details for the issue
What did you do?
select 1;ENTERkey many times that query from step 1 is not visible in a sql editor tabselect 2;Execute current lineorCtrl+F5What did you expect to see?
Scrollbar position is the same as it was before execution.
What did you see instead?
Scrollbar position is reset (scrollbar is in its origin position at the top).
Useful extra information
Win 8.1 x64
DB4S Version 3.11.99 (Nov 23 2019)