1
0
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:
Simon Tatham
2010-04-23 18:32:15 +00:00
parent 97ca111e29
commit d5aa23c116
7 changed files with 82 additions and 12 deletions

View File

@ -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.
*/