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

Prevent selection bar vanishes #221

Closed
wants to merge 1 commit into from
Closed

Prevent selection bar vanishes #221

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jul 31, 2017

better fix for issue #199 that also works well if the terminal window will be resized (PR #213)

@mptre
Copy link
Owner

mptre commented Aug 5, 2017

Thanks, I have to take a closer look at this later.

@mptre
Copy link
Owner

mptre commented Aug 24, 2017

@DBOTW Is this a bug fix or an attempt to reduce duplicated logic?

@ghost
Copy link
Author

ghost commented Aug 24, 2017

@mptre it's both and resetting the selection on CTRL-L can be deleted:

--- pick.c.orig	2017-08-24 19:08:12.452959404 +0200
+++ pick.c	2017-08-24 19:08:35.116958909 +0200
@@ -407,7 +407,6 @@
 			break;
 		case CTRL_L:
 			tty_size();
-			selection = yscroll = 0;
 			break;
 		case CTRL_W:
 			if (cursor_position == 0)

... please try it by resizing the window vertically lesser than the selection bar ...

@mptre
Copy link
Owner

mptre commented Sep 15, 2017

please try it by resizing the window vertically lesser than the selection bar

Sorry for not getting back sooner. I'm having a hard time reproducing
any bugs related screen resizing and selection now that the selection is
being reset on resize. Is this still an issue or resolved?

@ghost
Copy link
Author

ghost commented Sep 16, 2017

now that the selection is being reset on resize

IMHO this is confusing and should be deleted, but if we do this we will get this behavoir:
old
... the selection bar vanishes ... with this PR it looks like:
new
... the selection bar is always visible on screen ...

So this also fixes #199 by removing the range check on Page-Down and End ...

@mptre
Copy link
Owner

mptre commented Sep 17, 2017

Thanks for the GIFs, this sure looks like an improvement. What do use to
record your screen?

@ghost
Copy link
Author

ghost commented Sep 17, 2017

What do use to record your screen?

https://github.com/phw/peek

@mptre
Copy link
Owner

mptre commented Sep 18, 2017

Thanks! Tweaked and committed as 58c5b46.

@mptre mptre closed this Sep 18, 2017
@ghost ghost deleted the vanish branch September 18, 2017 18:13
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

Successfully merging this pull request may close these issues.

1 participant