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

reset diff viewer on refresh #194

Closed
Avinash-Bhat opened this Issue Aug 7, 2013 · 4 comments

Comments

Projects
None yet
2 participants
@Avinash-Bhat

while refreshing the diff viewer retains the previous diff contents
screen-cap-of-diff-no-reset

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Aug 9, 2013

Member

is this file selected when you see this?
how did you refresh? via ctrl-r or via the menu or via the button?

is this a file that was previously modified but then became unmodified, and thus shouldn't show up in the diff? clicking in empty area in the status widget clears out the diff view (and deselects any files).

try doing this -- click on a modified file and select one of the red or green diff lines in the diff view. hit "s". it'll stage that line and the diff view will refresh to show you that that line is no longer green (or red) modified, as it is now staged. in that use case the refresh is intentional.

if you're editing the file in your editor, and you add a line in the middle of the diff there, refresh keeps the scrollbars in the same place and updates the contents so that you can see that a new line was added. on linux inotify refreshes it automatically.

maybe you'd like a way to disable the "re-diff the selected file and update the diff view" behavior? that means you'd have to keep clicking the file all the time.. can you please describe what's going on a bit more?

Member

davvid commented Aug 9, 2013

is this file selected when you see this?
how did you refresh? via ctrl-r or via the menu or via the button?

is this a file that was previously modified but then became unmodified, and thus shouldn't show up in the diff? clicking in empty area in the status widget clears out the diff view (and deselects any files).

try doing this -- click on a modified file and select one of the red or green diff lines in the diff view. hit "s". it'll stage that line and the diff view will refresh to show you that that line is no longer green (or red) modified, as it is now staged. in that use case the refresh is intentional.

if you're editing the file in your editor, and you add a line in the middle of the diff there, refresh keeps the scrollbars in the same place and updates the contents so that you can see that a new line was added. on linux inotify refreshes it automatically.

maybe you'd like a way to disable the "re-diff the selected file and update the diff view" behavior? that means you'd have to keep clicking the file all the time.. can you please describe what's going on a bit more?

@Avinash-Bhat

This comment has been minimized.

Show comment
Hide comment
@Avinash-Bhat

Avinash-Bhat Aug 12, 2013

is this file selected when you see this?

there is no file to select. The working branch is clean

how did you refresh? via ctrl-r or via the menu or via the button?

shortcut key was used

is this a file that was previously modified but then became unmodified, and thus shouldn't show up in the diff? clicking in empty area in the status widget clears out the diff view (and deselects any files).

this happens when commit is done through another interface, say, through git commit command. When I come back and refresh cola through Ctrl+r, the diff will be still there, the change viewer resets but the diff doesn't

I hope this explains it to you better.

is this file selected when you see this?

there is no file to select. The working branch is clean

how did you refresh? via ctrl-r or via the menu or via the button?

shortcut key was used

is this a file that was previously modified but then became unmodified, and thus shouldn't show up in the diff? clicking in empty area in the status widget clears out the diff view (and deselects any files).

this happens when commit is done through another interface, say, through git commit command. When I come back and refresh cola through Ctrl+r, the diff will be still there, the change viewer resets but the diff doesn't

I hope this explains it to you better.

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Aug 12, 2013

Member

Thanks, yes, that helps. I had a feeling there might be an edge case somewhere. This is fixable. When refreshing we just need to check for the clean (empty) state and empty out the diff.

Member

davvid commented Aug 12, 2013

Thanks, yes, that helps. I had a feeling there might be an edge case somewhere. This is fixable. When refreshing we just need to check for the clean (empty) state and empty out the diff.

@Avinash-Bhat

This comment has been minimized.

Show comment
Hide comment
@Avinash-Bhat

Avinash-Bhat Aug 12, 2013

this is also happening when you revert some changes. When it's the last file, until you click the status viewer, the diff will be there.

this is also happening when you revert some changes. When it's the last file, until you click the status viewer, the diff will be there.

@davvid davvid closed this in 068064d Aug 17, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment