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

Wrong cursor position when switching to full screen #1568

Closed
Maximus5 opened this issue Jul 31, 2015 · 17 comments
Closed

Wrong cursor position when switching to full screen #1568

Maximus5 opened this issue Jul 31, 2015 · 17 comments

Comments

@Maximus5
Copy link
Owner

Originally reported on Google Code with ID 1568

OS version: Win7 SP1 x64 / Win8.1 x64
ConEmu version: 140428 (but the issue is present in the previous releases)

*Bug description*
With bash shell (version 1.9.2-preview20140411, stock without any custom .bashrc, but
the issue is present in the previous releases) the cursor is set in the middle of the
screen when the terminal is switched to full screen.

*Steps to reproduction*
1. Open the terminal (not at full screen, for instance, with 24 lines)
2. Press ENTER until the cursor in at the the end of the window terminal
3. Press ALT-ENTER to switch to full screen
4. The cursor is about at the middle of the window (ok)
5. Press ENTER until the cursor in at the the end of the window terminal
6. Press ALT-ENTER to switch to normal window
7. The cursor is at the end of the window (ok)
8. Press ALT-ENTER to switch to full screen
9. The cursor is about at the middle of the window (WRONG). Below the cursor there
are a few lines not empty but with the prompt.

Thanks in advance,
Alberto

Reported by albertosantini on 2014-04-29 07:59:34

@Maximus5
Copy link
Owner Author

Seems like CygwinMsys problem. And nothing to do with ConEmu...

Have you checked the same in the standard Windows console? Of course, Not Alt-Enter,
but changing size (cells) via console window properties.

Reported by ConEmu.Maximus5 on 2014-04-29 08:05:27

@Maximus5
Copy link
Owner Author

Reported by ConEmu.Maximus5 on 2014-04-29 08:05:34

  • Labels added: cygwin

@Maximus5
Copy link
Owner Author

In standard Windows console, changing the font size or the window size - from small
to big and the opposite, doesn't raise this issue.

I read CygwinMsys and I would understand if you would mark this issue a "won't fix".

Anyway it is quite annoying issue.
It is appreciated if you can confirm it is not a ConEmu issue.

Thanks in advance,
Alberto

Reported by albertosantini on 2014-04-29 09:27:21

@Maximus5
Copy link
Owner Author

Another way to reproduce the issue.

1. Go to full window
2. Get a long output, just to fill all the window. For instance twice or three times
the command "git", just to display the help info.
3. Press ALT-ENTER to switch to normal window.
4. The prompt is at the end of the window (ok). 
5. Below the prompt there is the rest of the output (WRONG). You can see scrolling
down.

Reported by albertosantini on 2014-04-29 09:33:40

@Maximus5
Copy link
Owner Author

You need at least show screenshots of your problem.

Reported by ConEmu.Maximus5 on 2014-04-29 10:37:22

@Maximus5
Copy link
Owner Author

I attached a screenshot sequence reproducing the second way of the issue (from full
screen to normal window).

1.png - normal window filled with text (press ALT-ENTER, goto 2).
2.png - full screen (ok).
3.png - full screen filled with text (press ALT-ENTER, goto 4).
4.png - normal window with WRONG prompt/cursor position. 

In 4 I scrolled down a bit to show the text below the prompt.

Reported by albertosantini on 2014-04-29 11:11:10


- _Attachment: 1.png
![1.png](https://storage.googleapis.com/google-code-attachments/conemu-maximus5/issue-1568/comment-6/1.png)_ - _Attachment: 2.png
![2.png](https://storage.googleapis.com/google-code-attachments/conemu-maximus5/issue-1568/comment-6/2.png)_ - _Attachment: 3.png
![3.png](https://storage.googleapis.com/google-code-attachments/conemu-maximus5/issue-1568/comment-6/3.png)_ - _Attachment: 4.png
![4.png](https://storage.googleapis.com/google-code-attachments/conemu-maximus5/issue-1568/comment-6/4.png)_

@Maximus5
Copy link
Owner Author

I get the same thing after scrolling up to see the buffer. Would that be related?

Reported by sam.hasler on 2014-04-30 08:47:39

@Maximus5
Copy link
Owner Author

Of course yes. And that is one more argue the bug is not in ConEmu.
However, I'm going to check that to ensure

Reported by ConEmu.Maximus5 on 2014-04-30 09:00:16

@Maximus5
Copy link
Owner Author

I reproduced almost the same issue with cmd (vs. bash), following the same steps above
1-4).

After switching from full screen to normal window, with cmd the result seems scrolled
up a few lines. 

After pressing ENTER, the window scrolls down and the prompt is positioned in the last
line. Here I would expect to see the prompt as the last line WITHOUT pressing ENTER.

With bash, after pressing ENTER, the prompt is in the middle of the screen (as stated
above).

Reported by albertosantini on 2014-04-30 11:31:58

@Maximus5
Copy link
Owner Author

I see now.
Actually, no need to go Fullscreen. Just resize window with mouse dragging bottom edge.
The same behavior is when you run cmd from Win+R.
But I can't repro your bug with gitbash. Different version may be.

Anyway, this behavior is not a bug, but I think it will be more handy to "lock" cursor
at the visible area.

Reported by ConEmu.Maximus5 on 2014-04-30 11:50:50

  • Status changed: Accepted

@Maximus5
Copy link
Owner Author

Thanks to try "locking" cursor at the visible area.
I think it is a good tradeoff.

With bash I have the same issue since msysgit 1.7.x. 

Reported by albertosantini on 2014-04-30 12:03:21

@Maximus5
Copy link
Owner Author

One more thing.
I believe, you will observe the bug, if you just scroll window contents with mouse
wheel, for example.
Scroll it backward and try your bash.
Reproduced? That definitely means you need to report the bug to developers.

Reported by ConEmu.Maximus5 on 2014-04-30 12:07:10

@Maximus5
Copy link
Owner Author

Reproduced (full screen and normal window).

1. clear
2. git (for three or more times to fill completely the screen with some output)
3. scroll to the top
4. ls -al

The output is displayed at the end of the screen and NOT at the end of the buffer.

Anyway if I press ENTER at point 4, without executing a command, the screen scrolls
down and the prompt is positioned correctly.





Reported by albertosantini on 2014-04-30 12:17:13

@Maximus5
Copy link
Owner Author

Maybe another way to manage the limit of cygwinmsys shell, it would be attach the execution
of a command when the user switches between normal window and full screen (or the opposite).

I have been thinking on "clear".
After swithcing, a "clear" command is executed automagically.

Just my two cents.

Reported by albertosantini on 2014-05-01 11:07:06

@Maximus5
Copy link
Owner Author

141012

Reported by ConEmu.Maximus5 on 2014-10-13 07:48:49

@Maximus5
Copy link
Owner Author

Great improvement.
Good job!

Tested with git version 1.9.4.msysgit.2 (1.9.4-preview20140929).

For me it is enough. 
You may close the issue.


Reported by albertosantini on 2014-10-13 09:32:40

@Maximus5
Copy link
Owner Author

Reported by ConEmu.Maximus5 on 2014-10-23 08:05:16

  • Status changed: Fixed

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

No branches or pull requests

1 participant