Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffer reloading and cursor positioning working as intended? #59

Open
ghost opened this issue May 3, 2020 · 11 comments
Open

buffer reloading and cursor positioning working as intended? #59

ghost opened this issue May 3, 2020 · 11 comments

Comments

@ghost
Copy link

ghost commented May 3, 2020

Got two questions on intended behavior.

First, when switching between say the buffer list and some other buffer the current cursor position inside the buffer list will be reset (i.e. to the top). As far as I can tell this happens for all reduxlists.
Is this intentional? Consider a very long list and the user switching and upon returning to the list the cursor always resets to the top which can be annoying (somewhat related is that going to the end of the buffer in a reduxlist only goes to the end of the currently visible page).

The other point concerns buffer reloading.
When you change a file outside of TA which is open in TA and then select another file (not the one that was changed!) you will get a popup asking if you want to reload the changed file.
Normal TA only asks for that if the file was actually selected but in TR the confirmation always comes up when switching files.
Intended or not?

@rgieseke
Copy link
Owner

rgieseke commented May 3, 2020

Good questions,

the first one i can reproduce when switching buffers -- when switching views the position is kept.
So, unintended and agreeing that it is annoying!
Probably not surfacing when one uses selection by typing some chars, definitely worth investigating.

Reload behaviour, not sure i can reproduce, i get this, when e.g. closing some files in a buffer list sometimes, but not when just opening the buffer-switch dialog.

@ghost
Copy link
Author

ghost commented May 3, 2020

when switching views the position is kept.

Correct, however at least for me the styling is lost when switching between views.

@ghost
Copy link
Author

ghost commented May 3, 2020

but not when just opening the buffer-switch dialog.

May have miscommunicated this. The effect happens when opening another file (that is not the one that was changed) from the buffer-list. The only precondition is that a file was changed outside of TA.

For clarification:

  • open file1 in TA
  • switch to file2
  • edit file1 outside of TA
  • switch to file3 via buffer-list
  • should get a dialog about reloading file1

@rgieseke
Copy link
Owner

rgieseke commented May 3, 2020

For clarification:

Thanks for the detailed description, i don't get this with your description but sometimes when i close another file (with ctrl-d) in the buffer-list (notification for file1).

@ghost
Copy link
Author

ghost commented May 3, 2020

Yeah, it does happen on closing as well. Not sure how it works though. Does the buffer list cycle through files at some point?

@ghost
Copy link
Author

ghost commented May 4, 2020

styling is lost when switching between views.

Were you able to corroborate this?

@rgieseke
Copy link
Owner

rgieseke commented May 4, 2020

Yes, as typing something does a refresh with colors, this is probably an easy fix ...

@ghost
Copy link
Author

ghost commented May 14, 2020

this is probably an easy fix ...

Great to hear, looking forward to your fix!
If you find this easy to fix then you can probably fix the cursor position as well. I suspect the nature of those bugs is quite similar.

As for the reloading of files. That should pretty much fix itself once you apply your changes for TA11 because the closing mechanism changes.
I checked and by removing

view:goto_buffer(sel_buffer)
the files will no longer be openend and therefore also not reloaded while still being closed.
Still does not explain why it happens in some other instances but it will be a good start.

@rgieseke
Copy link
Owner

probably an easy fix :-) I don't know yet ...

I've merged the 11 branch (i've been using the alpha for quite a while now), it seems that the closing behaviour has indeed changed, but if one just removes that line the buffer-list buffer is not active after closing a file, isn't it?

@ghost
Copy link
Author

ghost commented May 16, 2020

but if one just removes that line the buffer-list buffer is not active after closing a file, isn't it?

Yeah, bummer.

Just tried the TA11 version and aren't the colors off for the buffer list? It's using the color for comments and something else when it should be the color for strings/keywords I think.

@rgieseke
Copy link
Owner

Just tried the TA11 version and aren't the colors off for the buffer list? It's using the color for comments and something else when it should be the color for strings/keywords I think.

Good catch, thanks!

Should be fixe here:

533daf1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant