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

Preserve multiline prompt on 'clear buffer' gnachman/iterm2#1330 #249

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dreadatour
Copy link

"Clear Buffer" clears all output except last line, which supposed to be a command prompt. But prompt can consist of more then one line. It would be great to set number of lines that isn't clear by "Clear Buffer".

https://gitlab.com/gnachman/iterm2/issues/1330

if (preserveCursorLine) {
numLinesToScroll = cursor_.y;
if (preservePromptLines > 0) {
numLinesToScroll = cursor_.y - preservePromptLines + 1;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must ensure this does not go negative. MAX(0, cursor_.y - preservePromptLines + 1).

@dreadatour dreadatour force-pushed the preserve-multiline-prompt-on-clear-buffer branch 2 times, most recently from a2d8d6d to 771f93d Compare February 1, 2016 11:51
@dreadatour dreadatour force-pushed the preserve-multiline-prompt-on-clear-buffer branch from 771f93d to 8cf13fa Compare February 1, 2016 11:51
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.

2 participants