mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
New SSH bug flag, for 'can't handle SSH2_MSG_IGNORE'. Another user
today reported an SSH2_MSG_UNIMPLEMENTED from a Cisco router which looks as if it was triggered by SSH2_MSG_IGNORE, so I'm experimentally putting this flag in. Currently must be manually enabled, though if it turns out to solve the user's problem then I'll probably add at least one version string... [Edited commit message: actually, I also committed in error a piece of experimental code as part of this checkin. Serve me right for not running 'svn diff' first.] [originally from svn r8926]
This commit is contained in:
25
terminal.c
25
terminal.c
@ -5136,6 +5136,31 @@ void term_scroll(Terminal *term, int rel, int where)
|
||||
term_update(term);
|
||||
}
|
||||
|
||||
/*
|
||||
* Scroll the scrollback to centre it on the beginning or end of the
|
||||
* current selection, if any.
|
||||
*/
|
||||
void term_scroll_to_selection(Terminal *term, int which_end)
|
||||
{
|
||||
pos target;
|
||||
int y;
|
||||
int sbtop = -sblines(term);
|
||||
|
||||
if (term->selstate != SELECTED)
|
||||
return;
|
||||
if (which_end)
|
||||
target = term->selend;
|
||||
else
|
||||
target = term->selstart;
|
||||
|
||||
y = target.y - term->rows/2;
|
||||
if (y < sbtop)
|
||||
y = sbtop;
|
||||
else if (y > 0)
|
||||
y = 0;
|
||||
term_scroll(term, -1, y);
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper routine for clipme(): growing buffer.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user