diff --git a/macssh/source/Screens/rsdefs.h b/macssh/source/Screens/rsdefs.h index 10aacbe..f972785 100755 --- a/macssh/source/Screens/rsdefs.h +++ b/macssh/source/Screens/rsdefs.h @@ -92,7 +92,8 @@ struct RSdata { bfsiz, // RAB BetterTelnet 1.0fc9 - bold font size bfstyle, // RAB BetterTelnet 1.0fc9 - bold font style realbold, // RAB BetterTelnet 1.2 - use bold font for bold - boldislarger; // to use real bold + boldislarger, // to use real bold + keepselection; // try to keep current selection when scrolling Boolean skip; /* TRUE if we are skipping the output */ Boolean diff --git a/macssh/source/Screens/rsinterf.c b/macssh/source/Screens/rsinterf.c index c6a236d..a742b51 100755 --- a/macssh/source/Screens/rsinterf.c +++ b/macssh/source/Screens/rsinterf.c @@ -757,6 +757,7 @@ short RSnewwindow RScurrent->allowBold = flags & RSWallowBold; RScurrent->colorBold = flags & RSWcolorBold; RScurrent->realbold = flags & RSWrealbold; + RScurrent->keepselection = flags & RSWKeepSelection; RSTextFont(fnum,fsiz,0); /* BYU */ TextSize(fsiz); RSfontmetrics(); diff --git a/macssh/source/Screens/rsinterf.proto.h b/macssh/source/Screens/rsinterf.proto.h index f9ad7c3..49061fc 100755 --- a/macssh/source/Screens/rsinterf.proto.h +++ b/macssh/source/Screens/rsinterf.proto.h @@ -15,7 +15,8 @@ enum { RSWjumpscroll = 0x00000200, RSWrealBlink = 0x00000400, RSWvt7bit = 0x00000800, - RSWHideScroll = 0x00001000 + RSWHideScroll = 0x00001000, + RSWKeepSelection = 0x00002000 }; diff --git a/macssh/source/Screens/rsmac.c b/macssh/source/Screens/rsmac.c index a89a159..63221de 100755 --- a/macssh/source/Screens/rsmac.c +++ b/macssh/source/Screens/rsmac.c @@ -867,8 +867,7 @@ void RSdellines // attempt to keep current selection -#if 0 - if (scrolled) + if (scrolled && !RScurrent->keepselection) { if (RScurrent->selected /*&& scrolled < 0*/) { @@ -882,7 +881,6 @@ void RSdellines } /* if */ // } /* if */ -#endif if ( RScurrent->selected && scrolled ) { RScurrent->anchor.v += scrolled; @@ -977,13 +975,12 @@ void RSinslines RSsetattr(0, 0); // attempt to keep current selection -#if 0 - if (RScurrent->selected != 0 && (scrolled < 0)) + if (RScurrent->selected != 0 && (scrolled < 0) && !RScurrent->keepselection) { /* unhighlight and cancel selection */ UnHiliteSelection(w); } /* if */ -#endif + if ( RScurrent->selected && scrolled ) { RScurrent->anchor.v += scrolled; RScurrent->last.v += scrolled; diff --git a/macssh/source/Screens/wind.h b/macssh/source/Screens/wind.h index bf451fb..a77841a 100755 --- a/macssh/source/Screens/wind.h +++ b/macssh/source/Screens/wind.h @@ -271,7 +271,8 @@ TECObjectRef Boolean launchurlesc, // true if we accept to process 'launchurl' escape sequences x11forward, - autoreconnect; + autoreconnect, + keepselection; /* NONO */ }; diff --git a/macssh/source/telnet.rsrc b/macssh/source/telnet.rsrc index ec63db6..f52a52f 100755 Binary files a/macssh/source/telnet.rsrc and b/macssh/source/telnet.rsrc differ