You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scrollbar position (in sql editor tab) resets after running a query #2073
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.
The starting point of the failing query was considered from the ending point of the previous statement. In this case when there is a lot of whitespace, it had this effect. Now all that whitespace is skipped and the starting point for indicating the error is at the statement beginning (in the absence of any comment that will not be skipped).
Failed queries never undid a savepoint that we set when executing some SQL code. Now it is always rollback appropriately when the statement does not change anything, independently of having failed or not.
The fixes are already committed and will be available in the tomorrow's nightly. Could you try again and report any pending problem?
@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?
That is caused by the hourglass icon appearing and modifying the tab bar height. Maybe this could solve the problem: ui->tabSqlAreas->setMinimumSize(ui->tabSqlAreas->iconSize());
but I don't see any change in Linux when I set big values for that minimum size, so it might do nothing actually.
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.
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.
Activity
mgrojo commentedon Dec 29, 2019
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.
T1mL3arn commentedon Dec 30, 2019
Tested
Dec 28 2019nightly. The behavior is the same.Some new info: if db is marked as dirty, then scrollbar works as expected.
To reproduce
select 2to something that produces an error (e.g.select hi)Execute current linerevert changes)select 2Saving current scrollbar position?
Skip whitespace at the beginning of a failing query for the indication
Revert to savepoint when applicable, also after failed statements
mgrojo commentedon Dec 30, 2019
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?
T1mL3arn commentedon Jan 3, 2020
@mgrojo could you trigger windows build script(or whatever) so I can test new version ?
mgrojo commentedon Jan 3, 2020
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.
T1mL3arn commentedon Jan 3, 2020
Tested. Now db is not marked as dirty for queries with error. Wrong scroll behavior still remains for correct and incorrect queries.
mgrojo commentedon Jan 3, 2020
I'd need detail steps to reproduce it or if you could record a video, it'd be more easy to reproduce and analyse.
T1mL3arn commentedon Jan 4, 2020
Here is the video https://raw.githubusercontent.com/T1mL3arn/db4s-screen-cast/master/2020-01-04%2013-30-18.mp4
Take into account Windows line separator in Execute SQL
mgrojo commentedon Jan 4, 2020
@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?
New screencast for DB4S issue
T1mL3arn commentedon Jan 5, 2020
Tested. Scroll behavior for incorrect queries is fixed. The wrong scroll behavior for correct queries is still there. Here is a new video.
mgrojo commentedon Jan 5, 2020
That is caused by the hourglass icon appearing and modifying the tab bar height. Maybe this could solve the problem:
ui->tabSqlAreas->setMinimumSize(ui->tabSqlAreas->iconSize());but I don't see any change in Linux when I set big values for that minimum size, so it might do nothing actually.
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?
Show a useful icon in SQL tabs
Show a useful icon in SQL tabs
Show a useful icon in SQL tabs (#2153)
Show a useful icon in SQL tabs (#2153)
mgrojo commentedon Jun 21, 2020
@T1mL3arn This is supposed to be fixed in our release 3.12.0. Could you please confirm and close this issue?
T1mL3arn commentedon Jun 22, 2020
@mgrojo Checked 3.12.0, It works the same as described in the post above, i.e. it is still broken.
mgrojo commentedon Jun 22, 2020
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.
justinclift commentedon Jun 30, 2020
@MKleusberg Thoughts on this one too? 😄