1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
Commit Graph

388 Commits

Author SHA1 Message Date
Simon Tatham
569da2eb7b Cursor position, selection highlights and mouse clicks are now all
transformed back and forth according to the character position
permutation output from the bidi algorithm. I was expecting that to
be a lot harder.

[originally from svn r4915]
2004-11-28 09:24:57 +00:00
Simon Tatham
92f3b101f5 Slight improvement to cursor blink timing: since the cursor doesn't
blink when the window doesn't have focus, we don't schedule blink
timers at that point either.

Infrastructure change: term->has_focus should now not be written
directly from outside terminal.c. Instead, use the function
term_set_focus, which will sort out the blink timers as well.

[originally from svn r4911]
2004-11-27 19:34:45 +00:00
Simon Tatham
7ecf13564a New timing infrastructure. There's a new function schedule_timer()
which pretty much any module can call to request a call-back in the
future. So terminal.c can do its own handling of blinking, visual
bells and deferred screen updates, without having to rely on
term_update() being called 50 times a second (fixes: pterm-timer);
and ssh.c and telnet.c both invoke a new module pinger.c which takes
care of sending keepalives, so they get sent uniformly in all front
ends (fixes: plink-keepalives, unix-keepalives).

[originally from svn r4906]
[this svn revision also touched putty-wishlist]
2004-11-27 13:20:21 +00:00
Simon Tatham
1fd5bcc9fa Fix typo in term_size(), flagged by a Dr Watson log from Temme Rainer.
[originally from svn r4881]
2004-11-22 13:49:12 +00:00
Simon Tatham
814408f2d3 DJSD requests a force-monochrome option for users who dislike angry-
fruit-salad applications :-)

[originally from svn r4762]
2004-11-09 17:57:32 +00:00
Simon Tatham
d412fed542 Fix bug in scrollback compression, which manifested when attempting
to encode a very long (len>128) run of the same literal.

[originally from svn r4647]
2004-10-16 12:36:50 +00:00
Simon Tatham
70230fc0ca Fix two memory leaks in the new code. (There's no point compressing
the scrollback if you then leak away all the memory you saved!) One
of the leaks - by far the bigger of the two - was in my temporary
diagnostic function cc_check(), which is particularly embarrassing :-)

[originally from svn r4638]
2004-10-15 12:37:44 +00:00
Simon Tatham
5f05f03fb2 Add missing check_boundary() calls in destructive backspace handler.
[originally from svn r4635]
2004-10-15 11:51:26 +00:00
Simon Tatham
833bcbb559 A combining character on U+0020 SPACE stops it from being
`uninteresting' to the clipboard processing.

[originally from svn r4634]
2004-10-15 11:42:02 +00:00
Simon Tatham
89e36c9567 Mark the trial decompress in every call to compressline() with the
XXX-REMOVE-BEFORE-RELEASE tag.

[originally from svn r4633]
2004-10-15 11:29:02 +00:00
Simon Tatham
9b37d130ed Don't forget to flush the bidi cache when the user enables or
disables bidi or shaping, otherwise they'll have to do a manual
screen refresh to see any difference.

[originally from svn r4632]
2004-10-15 11:14:42 +00:00
Simon Tatham
6b136f5c2f Store line widths in the bidi cache, so we don't fail to re-bidi a
line when the window size changes.

[originally from svn r4631]
2004-10-15 11:11:19 +00:00
Simon Tatham
0d05595db9 Fix many bugs in resizeline().
[originally from svn r4629]
2004-10-15 10:48:27 +00:00
Simon Tatham
845138a1e8 Fix applying combining characters to double-width characters.
[originally from svn r4628]
2004-10-15 09:28:46 +00:00
Simon Tatham
8d7edeafd3 Fix Windows redraw problem on RH half of wrapped lines. (term_paint
was checking whether lattr == LATTR_NORM, where it should have been
checking (lattr & LATTR_MODE) to mask off LATTR_WRAPPED et al.

[originally from svn r4627]
2004-10-15 09:16:58 +00:00
Simon Tatham
e49ce5559b I broke ordinary line wrapping as a result of retiring cpos. Oops.
[originally from svn r4626]
2004-10-15 09:06:45 +00:00
Simon Tatham
db54732e38 Fix cursor display on a combined character cell.
[originally from svn r4625]
2004-10-15 08:51:57 +00:00
Simon Tatham
557256c38e Mark cc_check() and all calls to it with the new
XXX-REMOVE-BEFORE-RELEASE tag, since they're performance-intensive.
And now that I'm reasonably confident of remembering to remove them
before the next release, I feel less guilty about adding them willy-
nilly all over the place, so I've shoved in a couple more for now :-)

[originally from svn r4624]
2004-10-15 08:22:49 +00:00
Simon Tatham
089775eb02 First-stage support for Unicode combining characters. The `chars'
array of each `termline' structure now contains optional additional
entries after the normal number of columns, which are used to chain
a linked list of combining characters off any primary termchar that
needs it. This means we support arbitrarily many combining
characters per cell (unlike xterm's hard limit of 2).

Cut and paste works correctly (selecting a character cell containing
multiple code points causes all those code points to be cut and
pasted). Display works by simply overlaying all the relevant
characters on top of one another; this is good enough for Unix
(xterm does the same thing), and mostly seems OK for Windows except
that the Windows Unicode fonts have a nasty habit of not containing
most of the combining characters and thus overlaying an
unknown-code-point box on your perfectly good base glyph.

I had no idea how to add support in the Mac do_text(), so I've
simply stuck in an assertion that will trigger the first time a
combining character is displayed, and hopefully this will bite
someone with the clue to fix it.

[originally from svn r4622]
2004-10-14 16:42:43 +00:00
Simon Tatham
8f656a37b5 Fix segfaults in terminal resizing, introduced by re-engineering.
[originally from svn r4613]
2004-10-13 13:35:29 +00:00
Simon Tatham
709a94e5f2 Re-engineering of terminal emulator, phase 1.
The active terminal screen is no longer an array of `unsigned long'
encoding 16-bit Unicode plus 16 attribute bits. Now it's an array of
`termchar' structures, which currently have 32-bit Unicode and 32
attribute bits but which will probably expand further in future.

To prevent bloat of the memory footprint, I've introduced a mostly
RLE-like compression scheme for storing scrollback: each line is
compressed into a compact (but hard to modify) form when it moves
into the term->scrollback tree, and is temporarily decompressed when
the user wants to scroll back over it. My initial tests suggest that
this compression averages about 1/4 of the previous (32 bits per
character cell) data size in typical output, which means this is an
improvement even without counting the new ability to extend the
information stored in each character cell.

Another beneficial side effect is that the insane format in which
Unicode was passed to front ends through do_text() has now been
rendered sane.

Testing is incomplete; this _may_ still have instabilities. Windows
and Unix front ends both seem to work as far as I've looked, but I
haven't yet looked very hard. The Mac front end I've edited (it
seemed obvious how to change it) but I can't compile or test it.

As an immediate functional effect, the terminal emulator now
supports full 32-bit Unicode to whatever extent the host platform
allows it to. For example, if you output a 4-or-more-byte UTF-8
character in Unix pterm, it will not display it properly, but it
will correctly paste it back out in a UTF8_STRING selection. Windows
is more restricted, sadly.

[originally from svn r4609]
2004-10-13 11:50:16 +00:00
Jacob Nevins
088a1d37e9 Flush the logfile reasonably frequently in `printable output only' and
`all session data' modes, without completely mauling the performance, by
fflush()ing once per term_out(). If anyone complains I suppose we can
make this optional.

[originally from svn r4445]
2004-08-12 01:02:01 +00:00
Simon Tatham
deaeb2a287 We shouldn't reference off the end of the display line when checking
for UCSWIDE. Thanks Jacob, for catching this with valgrind.

[originally from svn r4338]
2004-07-20 20:13:25 +00:00
Simon Tatham
fb7dd5a255 At last! After much delay, much faffing back and forth, and much
enhancement and fiddling, I have now massaged Arabeyes' first patch
into a form I'm happy to check in. Phew.

[originally from svn r4236]
2004-05-22 10:36:50 +00:00
Owen Dunn
e4f30d3b7a Make `Copy all to Clipboard' copy all non-empty lines from the
scrollback and the terminal to the clipboard, rather than just the
content before the cursor.  Should fix copyall-to-cursor.

[originally from svn r3929]
2004-03-10 17:11:12 +00:00
Simon Tatham
0f259c23ea Various uninitialised-variable accesses picked up by valgrind.
[originally from svn r3723]
2004-01-17 14:25:36 +00:00
Jacob Nevins
8e2fd15bd5 Remove all the "assert(len>0)" which forbade zero-length writes across the
from_backend() interface, after having made all implementations safe against
being called with len==0 and possibly-NULL/undefined "data".

(This includes making misc.c:bufchain_add() more robust in this area.)

Assertion was originally added 2002-03-01; e.g., see plink.c:1.53 [r1571].

I believe this now shouldn't break anything.

This should hopefully make `ppk-empty-comment' finally GO AWAY. (Tested
with Unix PuTTY.)

[originally from svn r3500]
[r1571 == fdbd697801]
2003-10-12 13:16:39 +00:00
Owen Dunn
893c432a77 Consider bells as a display event.
[originally from svn r3329]
2003-07-05 11:35:33 +00:00
Ben Harris
b287bd5606 Improve SCOANSI emulation: The colours that SGR 0 returns to are now changed
by the SCO SNF and SNB sequences, which seems to be what the SCO console does
(at least in the new mode documented for OpenServer 5.0.6).

[originally from svn r3286]
2003-06-21 22:40:42 +00:00
Ben Harris
a00efa525a Add comments to case statements containing the mnemonics for the various
escape and control sequences.  This should make it easier to find the
implementation of the one you're interested in.

[originally from svn r3283]
2003-06-21 19:38:56 +00:00
Ben Harris
68da549341 Support for more SCO ANSI escape sequences:
CSI = Ps c
CSI = Pn1 ; Pn2 C
CSI = Ps D
CSI = Ps F
CSI = Ps G
SGR 6

Patch derived from one supplied by Leonid Lisoskiy, with several fixes from me.

[originally from svn r3263]
2003-06-15 22:05:05 +00:00
Simon Tatham
171ce1e780 Experimental change in the behaviour of `disable alternate terminal
screen'. Now it also disables the save-and-restore-cursor behaviour
of ESC[?1048h and ESC[?1049h, since these sequences seem to be
output by software trying to switch to the alternate screen, and it
looks very odd to have the cursor position restored to where it was
before `less' when the garbage `less' wrote all over the screen is
still around. The `traditional' ESC 7 and ESC 8 still function as
normal, on the basis that they aren't usually used in conjunction
with the alternate screen. I'm not sure whether this will be the
right decision; I'm prepared to change it back if a sufficiently
serious counterexample shows up.

[originally from svn r3222]
2003-05-27 09:43:14 +00:00
Simon Tatham
beea582b35 Should fix Debian bug #192674: another gcc complaint about
potentially uninitialised variable.

[originally from svn r3172]
2003-05-10 08:37:54 +00:00
Simon Tatham
041dcfd83d Unix makefile now uses -O2, which massively cuts down key exchange
time. This gives rise to a whole bunch of spare warnings, one or two
of which might have been actual bugs; now all resolved.

[originally from svn r3134]
2003-04-23 13:48:09 +00:00
Simon Tatham
8f94dd3881 Mid-session BCE reconfiguration wasn't taking effect immediately
because I forgot to set term->erase_char in response to the change
in term->use_bce. Oops.

[originally from svn r3105]
2003-04-12 09:05:28 +00:00
Simon Tatham
4b6ffd99f1 Disable window title reporting by default, since it's a security
hazard. I considered removing it completely, but I can't rule out
the possibility of an OS that actually takes security of its
terminal devices seriously, and which might be able to make sensible
and safe use of this feature.

[originally from svn r3103]
2003-04-12 08:59:06 +00:00
Simon Tatham
d93f7113d1 Rationalisation of the system of frontend handles. Most modular bits
of PuTTY (terminal, backend, logctx etc) take a `void *' handle
passed to them from the frontend, and used as a context for all
their callbacks. Most of these point at the frontend structure
itself (on platforms where this is meaningful), except that the
handle passed to the backend has always pointed at the terminal
because from_backend() was implemented in terminal.c. This has
finally bitten Unix PuTTY, because both backend and logctx have
been passing their respective and very different frontend handles to
logevent(), so I've fixed it.
from_backend() is now a function supplied by the _frontend_ itself,
in all cases, and the frontend handle passed to backends must be the
same as that passed to everything else. What was from_backend() in
terminal.c is now called term_data(), and the typical implementation
of from_backend() in a GUI frontend will just extract the terminal
handle from the frontend structure and delegate to that.
This appears to work on Unix and Windows, but has most likely broken
the Mac build.

[originally from svn r3100]
2003-04-11 18:36:27 +00:00
Simon Tatham
ed46f3aa53 `Copy All' ought to de-highlight any existing selection, in line
with any other operation that shifts the X selection to stuff other
than the highlighted text.

[originally from svn r3098]
2003-04-11 18:10:13 +00:00
Simon Tatham
5107780c54 pterm now uses the new uxsel module, so it's one step closer to
being able to be a PuTTY as well as a pterm. In the process I've
also moved icky things like actually reading from the pty fd and
printing the `terminated on signal' messages into pty.c where they
obviously should have been in the first place. Also there's been one
interesting repercussion in the terminal code: terminal.c's
from_backend now calls term_out() directly rather than expecting the
front end to call it afterwards. This has had the entertaining side
effect of fixing a Windows-specific bug whereby activity in a port
forwarding through a PuTTY with a blinking cursor caused the cursor
to blink to ON (!!!!). So, a surprisingly far-reaching checkin as it
turns out...

[originally from svn r3017]
2003-03-29 18:30:14 +00:00
Simon Tatham
d36a4c3685 Introduced wrapper macros snew(), snewn() and sresize() for the
malloc functions, which automatically cast to the same type they're
allocating the size of. Should prevent any future errors involving
mallocing the size of the wrong structure type, and will also make
life easier if we ever need to turn the PuTTY core code from real C
into C++-friendly C. I haven't touched the Mac frontend in this
checkin because I couldn't compile or test it.

[originally from svn r3014]
2003-03-29 16:14:26 +00:00
Simon Tatham
70729da988 Fix off-by-one in selection update while scrolling. Thanks Richard B.
[originally from svn r3013]
2003-03-29 13:54:11 +00:00
Ben Harris
1a27942544 DECCOLM fix, take 2. It turns out that my last fix wasn't causing crashes,
but PuTTY was running out of memory, which is both easy and fatal under Mac OS
at present.  Having fixed that, I've re-instated the screen-clearing and
cursor-homing on DECCOLM, and added resetting the scroll region, since this
seems to help VTL's keypad diagram display correctly.

[originally from svn r3006]
2003-03-27 00:22:59 +00:00
Ben Harris
1ef0684e82 Revert last change. It seems to cause crashes when DECCOLM actually changes
the width of the window.

[originally from svn r3003]
2003-03-26 23:13:41 +00:00
Ben Harris
94ecb07b60 DECCOLM should clear the screen and home the cursor, so it does now.
Correct interactions with DECOM and DECSTBM not investigated.
Should fix bug "deccolm-cls", but I'll leave it open till I've checked the
interactions.

[originally from svn r3001]
2003-03-26 21:14:39 +00:00
Simon Tatham
e9cc328501 Richard B's patch for resize behaviour. The scrollback now contains
a marker which defines everything before it as `permanent'
scrollback and everything after it as `temporary'; only temporary
scrollback lines are returned to the main screen when the window
height is increased. Screen clears mark the lines pushed into the
scrollback as permanent; so lines explicitly cleared off the screen
by ESC[2J are never returned to it by mistake. This patch also fixes
the incorrect state the primary screen is left in when the window is
resized while the alternate screen is active.

[originally from svn r2923]
2003-03-07 18:18:38 +00:00
Simon Tatham
c5181dc498 Richard B's patch to push erased text into the scrollback on ESC[2J
clears, and also to temporarily push the primary screen contents
into the scrollback while the alternate screen is active and bring
it back afterwards.

[originally from svn r2910]
2003-03-06 12:51:12 +00:00
Simon Tatham
bd16b29a7a Oops, Ben is quite right about the rather appalling design of
filename_from_str. Here's a better fix, with some const
repercussions too.

[originally from svn r2768]
2003-02-01 17:24:27 +00:00
Ben Harris
21275897d2 Make save_scroll() static.
[originally from svn r2766]
2003-02-01 15:42:01 +00:00
Simon Tatham
ccf35b8a26 Fix the gcc warnings in this module (since we now seem to be
building -Werror under Unix this is quite important!).

[originally from svn r2764]
2003-02-01 12:28:43 +00:00
Ben Harris
fe5f4c14f4 Richard's lazy-scrolling patch. This builds up scroll operations in a list,
combining adjacent ones for the same region, and runs them all in do_paint.
I'm not sure it's entirely right, but it works on my Mac in every case I've
tested.

[originally from svn r2763]
2003-02-01 12:26:33 +00:00
Simon Tatham
bcfa137c21 Yet more fallout from the 16-colour changes. I think by this time
these fiddly little changes are no longer bugs I introduced
recently, they're bugs that have been around all along and I've only
just smoked out by altering the ATTR_* definitions.

[originally from svn r2754]
2003-01-30 13:39:24 +00:00
Simon Tatham
09815b5050 Ahem, and restore the missing & from that checkin. Arrgh.
[originally from svn r2741]
2003-01-28 09:30:14 +00:00
Simon Tatham
54f033ace0 Oh, _that's_ why that `if' had the sense it did. Good grief.
Apparently I used to rely on the fact that the same `erase_char'
used to wipe parts of the screen was also a good value to use for
resetting line attributes. Should now be more robust against future
reorganisations of the ATTR_* bit fields.

[originally from svn r2740]
2003-01-28 09:26:32 +00:00
Ben Harris
28edf621aa Security fascists might claim that logging every keypress to stderr is a bad
idea, so stop doing that (only in the Mac port, so not actually much of a
problem).

[originally from svn r2737]
2003-01-28 00:17:17 +00:00
Simon Tatham
c370336a92 xterm apparently supports ESC[90m through ESC[97m to set bright
foreground colours, and ESC[100m through ESC[107m to set bright
background colours. Hence, so do we. Bright-foreground is
distinguishable from bold, and bright-background distinguishable
from blink, when it leaves terminal.c; the front end may then choose
to display them in the same way if it's configured to do so. This
change makes the xterm backend for Turbo Vision (!!!) work properly.
Untested on Mac.

[originally from svn r2734]
2003-01-27 23:03:31 +00:00
Simon Tatham
70f8e2cd74 Blinking text was broken on pterm. This should fix it.
[originally from svn r2732]
2003-01-27 15:44:48 +00:00
Ben Harris
de34bdac6d First attempt at a platform-independent keyboard handler. This isn't complete
yet -- there's no Alt+keypad support, and no way for the front-end to find
out what it should do with the Num Lock light.  It's also not fully tested.
Nonetheless, it's at least as good as the previous Mac keyboard handler.
Other platforms probably shouldn't adopt it just yet.

[originally from svn r2728]
2003-01-27 00:39:01 +00:00
Ben Harris
af4be2e83e Change the term_mouse interface a little so that it gets passed
both the raw and the cooked mouse button, with the mapping being done in
advance by the front-end.  This is useful because it allows the front-end to
use information other than the raw button (e.g. the modifier state) to decide
which cooked button to generate.
.
Front ends other than the Mac one are untested, but they just call
translate_button() themselves and pass the result to term_mouse().

[originally from svn r2721]
2003-01-25 16:16:45 +00:00
Ben Harris
694aafa071 Add the ability to close sessions. This adds *_free() functions to most
areas of the code.  Not all back-ends have been tested, but Telnet and SSH
behave reasonably.

Incidentally, almost all of this patch was written through Mac PuTTY,
admittedly over a Telnet connection.

[originally from svn r2615]
2003-01-15 23:30:21 +00:00
Simon Tatham
b2374a64fd Deglobalise the Unicode module. Despite all my grand plans, I've
just done this the very simple way - bundle all the globals into a
data structure and pass pointers around. One particularly ugly wart
is that wc_to_mb now takes a pointer to this structure as an
argument (optional, may be NULL, and unused in any Unicode layer
that's even marginally less of a mess than the Windows one). I do
need to do this properly at some point, but for now this should just
about be adequate. As usual, the Mac port has not been updated.

[originally from svn r2592]
2003-01-14 18:28:23 +00:00
Simon Tatham
10eb26a7dd term->cfg is now a full copy of the Config structure, not a pointer;
and term_reconfig() now passes in a new structure which is copied
over the top. This means that the old and new structures can be
compared, and the _current_ as well as default states of auto wrap
mode, DEC origin mode, BCE, blinking text and character classes can
be conveniently reconfigured in mid-session without requiring a
terminal reset.

[originally from svn r2557]
2003-01-12 14:30:02 +00:00
Simon Tatham
3d90359d10 We just got mailed a Dr Watson log which suggests I failed to
initialise term->paste_len during initialisation, and indeed looking
at the code confirms this. I'm puzzled as to why valgrind didn't
spot this in pterm, though, since it's all in cross-platform code!

[originally from svn r2494]
2003-01-08 09:15:56 +00:00
Simon Tatham
8de5682450 CJK cleanups. Correct handling when the cursor is covering the
right-hand half of a CJK wide character; correct handling of cut and
paste when CJK text wraps between lines _irrespective of the parity
of the starting column_; correct handling of wordness values
irrespective of which half of a CJK character the user
double-clicked on; correct handling when any terminal activity
overwrites only one half of a CJK wide character. I think we now
behave marginally better than xterm in this respect (it has a redraw
problem when you overwrite the RH half of a CJK char), so I'm happy.
Also redefined the internal UCSWIDE marker to something in the
surrogate range, while I'm here, so that U+303F is available for use
by actual users.

[originally from svn r2426]
2003-01-02 16:20:29 +00:00
Simon Tatham
241570c04f SCO ACS part 2 (ESC[12m) apparently puts the top half of CP437 into
_both_ halves of the character set, rather than flipping the two
halves. My source for this is linux/drivers/char/console.c.

[originally from svn r2394]
2002-12-31 11:03:23 +00:00
Ben Harris
873b95deff Put prototypes for the functions exported by wcwidth.c in putty.h, and remove
one from terminal.c.  Have wcwidth.c include putty.h to get its prototypes.

[originally from svn r2377]
2002-12-29 15:08:27 +00:00
Ben Harris
4345935c22 Make resizeline() and lineptr() static and give them prototypes.
[originally from svn r2376]
2002-12-29 14:47:01 +00:00
Simon Tatham
c583c6e85e Placate a trivial compiler warning.
[originally from svn r2347]
2002-12-18 11:51:09 +00:00
Ben Harris
12081087e7 Improve support for non-colour displays by adding a mask of attributes to
ignore when breaking text into runs for display, and implement setting this
on Mac (other ports just use 0xffffffff).

We don't use DeviceLoop for this any more because Apple Technical Q&A
QA1024 says we shouldn't.  Unlike their example, we don't depend on the
Display Manager's being present either.

[originally from svn r2264]
2002-11-29 00:32:03 +00:00
Ben Harris
19e1c15761 Fix a bug in scroll_display(): when the scrolled region contains the cursor
we need to update dispcurs as well as disptext.

Add scroll optimisation to scroll().  This makes it rather obvious that scroll
optimisation is breaking with PuTTY's usual policy of lazy updates, since
scrolling is done eagerly.  Fixing this so that all the scrolling is saved
up for do_paint would be nice, but non-trivial.

[originally from svn r2252]
2002-11-23 21:42:46 +00:00
Ben Harris
8280e645e4 Add a "Config *" argument to term_init(), and use that instead of the global
cfg throughout the terminal emulator.  Not tested in PuTTY and pterm, but they
just pass in &cfg.

[originally from svn r2248]
2002-11-23 19:01:01 +00:00
Ben Harris
03aa22be3c Bring in some of my scroll-optimisation stuff from the old Mac port.
This introduces a new front-end function, do_scroll(), which is expected to
scroll a part of the physical display and cause repaint events for any
areas that couldn't be scrolled (e.g. because they were hidden).
scroll_display() is a wrapper around this which also updates disptext to
match.

Currently, scroll_display is only used in response to user scrollback requests
(via term_scroll()), but extending scroll() to use it as well should be
easy.

All of this is conditional on the front end's defining OPTIMISE_SCROLL, since
only the Mac front end currently implements do_scroll().

[originally from svn r2242]
2002-11-23 13:07:29 +00:00
Ben Harris
b31bf55bc0 When processing input, refer to CR and LF as \015 and \012 respectively,
rather than \r and \n.  The latter tend to get swapped around by Mac C
compilers.

[originally from svn r2225]
2002-11-18 23:49:30 +00:00
Ben Harris
563eef2870 Change a temporary buffer from unsigned chars to chars, avoiding a pointer-cast
warning.

[originally from svn r2215]
2002-11-17 01:56:01 +00:00
Ben Harris
a12a78bcb9 Rename CharWidth() to char_width(). The former name clashes with an API
function in Mac OS.

[originally from svn r2205]
2002-11-09 21:46:21 +00:00
Simon Tatham
0720fc12ad terminal.c should call the frontend beep() routine even with
mode==BELL_VISUAL, otherwise taskbar flashing won't happen on visual
bells. It's up to the frontend routine to spot BELL_VISUAL and avoid
making any noise.

[originally from svn r2155]
2002-10-28 21:58:07 +00:00
Simon Tatham
ac545e0530 Another deglobalisation bug: failed to initialise term->curstype.
Thanks to valgrind for finding this one (aha! I knew there would be
benefits from doing a Unix port!).

[originally from svn r2152]
2002-10-28 17:30:47 +00:00
Simon Tatham
ea429ee71a Retire another global in favour of adding a feature to the
terminal.c interface.

[originally from svn r2148]
2002-10-26 14:06:52 +00:00
Simon Tatham
4756c15fc9 Yet more global-removal. The static variables in logging.c are now
absent, and also (I think) all the frontend request functions (such
as request_resize) take a context pointer, so that multiple windows
can be handled sensibly. I wouldn't swear to this, but I _think_
that only leaves the Unicode stuff as the last stubborn holdout.

[originally from svn r2147]
2002-10-26 12:58:13 +00:00
Simon Tatham
0b2523eeda Line discipline module now uses dynamically allocated data. Also
fixed one or two other minor problems.

[originally from svn r2141]
2002-10-26 10:16:19 +00:00
Simon Tatham
72ff571148 Major destabilisation, phase 2. This time it's the backends' turn:
each backend now stores all its internal variables in a big struct,
and each backend function gets a pointer to this struct passed to
it. This still isn't the end of the work - lots of subsidiary things
still use globals, notably all the cipher and compressor modules and
the X11 forwarding authentication stuff. But ssh.c itself has now
been transformed, and that was the really painful bit, so from here
on it all ought to be a sequence of much smaller and simpler pieces
of work.

[originally from svn r2127]
2002-10-25 11:30:33 +00:00
Simon Tatham
a9bd716df8 Cleanups from yesterday's destabilisation: lots of stuff in
terminal.c was apparently relying on implicit initialisation to
zero, and also I've removed the backends' dependency on terminal.h
by having terminal sizes explicitly passed in to back->size().

[originally from svn r2117]
2002-10-23 12:41:35 +00:00
Simon Tatham
0a80c983e2 Major destabilisation, phase 1. In this phase I've moved (I think)
all the global and function-static variables out of terminal.c into
a dynamically allocated data structure. Note that this does not yet
confer the ability to run more than one of them in the same process,
because other things (the line discipline, the back end) are still
global, and also in particular the address of the dynamically
allocated terminal-data structure is held in a global variable
`term'. But what I've got here represents a reasonable stopping
point at which to check things in. In _theory_ this should all still
work happily, on both Unix and Windows. In practice, who knows?

[originally from svn r2115]
2002-10-22 16:11:33 +00:00
Simon Tatham
bf0e8374f2 Thanks to Richard B for pointing out that xterm has its own variants
of the alternate-screen and save-cursor control sequences, with
subtly different semantics and entertaining interactions with the
usual ones. No thanks to xterm for doing so in the first place :-(
This checkin should sort it all out.

[originally from svn r2112]
2002-10-22 10:31:23 +00:00
Simon Tatham
07878d8b7c Implement Richard's really clever idea about bell overload mode:
it's automatically deactivated by any keypress, so that command-line
beeps from (e.g.) filename completion don't suddenly stop occurring,
but it still provides a rapid response to an accidental spewing of a
binary to your terminal.

[originally from svn r2107]
2002-10-20 13:23:30 +00:00
Simon Tatham
e30ab28d34 Oops - check in leftovers from yesterday's development. That's what
I get for running most of my cvs commands in the unix subdir :-/

[originally from svn r2078]
2002-10-16 09:28:17 +00:00
Simon Tatham
c01c1db847 Fixes to terminal.c to support blinking and visual bells under Unix.
[originally from svn r2068]
2002-10-15 16:40:22 +00:00
Simon Tatham
8bc305cafe Only engage a GTK idle function when absolutely necessary, otherwise
the whole app spins on it and takes up CPU all the time.

[originally from svn r2052]
2002-10-14 23:32:00 +00:00
Simon Tatham
ffff6f32c7 Selection now supported in pterm. Required small modifications
outside the unix subdir, owing to more things needing to become
platform-dependent.

[originally from svn r2033]
2002-10-13 11:24:25 +00:00
Simon Tatham
6d0e9b205d First phase of porting. pterm now compiles and runs under Linux+gtk.
The current pty.c backend is temporarily a loopback device for
terminal emulator testing, the display handling is only just enough
to show that terminal.c is functioning, the keyboard handling is
laughable, and most features are absent. Next step: bring output and
input up to a plausibly working state, and put a real pty on the
back to create a vaguely usable prototype. Oh, and a scrollbar would
be nice too.
In _theory_ the Windows builds should still work fine after this...

[originally from svn r2010]
2002-10-09 18:09:42 +00:00
Simon Tatham
64c52b0d30 Begin destabilisation in the wake of 0.53! This checkin contains the
beginning of a Unix port. It's nowhere near done, and currently it
won't even compile on Unix. But this represents the start of the
process of separating out platform-specific code, and also contains
the mkfiles.pl changes required to support a Unix makefile and a
non-flat source tree.

[originally from svn r1993]
2002-10-07 16:45:23 +00:00
Simon Tatham
ae476d5567 ANSI remote printer support. Raw mode only.
[originally from svn r1581]
2002-03-09 17:59:15 +00:00
Simon Tatham
fcb31d5cfe Well, there was bound to be one I'd forgotten: the new Features
panel should include an option to disable xterm mouse reporting. So
now it does. Woo.

[originally from svn r1579]
2002-03-09 11:47:39 +00:00
Simon Tatham
8c81f53a56 Oops. I wrote in the docs that no-remote-resize also included
no-remote-move-window, so I'd better live up to that...

[originally from svn r1577]
2002-03-06 23:06:07 +00:00
Simon Tatham
2df966b43c Add the Features panel, allowing you to disable a bunch of the more
controversial terminal features.

[originally from svn r1576]
2002-03-06 23:04:20 +00:00
Simon Tatham
d21683f92c The `wrapnext' flag should be saved and restored with the cursor
position. Failure to do this can give wrapnext==TRUE even with the
cursor not in the rightmost column.

[originally from svn r1572]
2002-03-02 17:37:48 +00:00
Simon Tatham
fdbd697801 from_backend() should always be called with len > 0. Only rlogin
mode ever failed to do this, and only Plink actually had a problem
with it, so this didn't become obvious for a while. rlogin mode is
fixed, and all implementations of from_backend() now contain an
assertion so that we should spot errors of this type more quickly in
future.

[originally from svn r1571]
2002-03-01 13:17:45 +00:00
Simon Tatham
349e2ce9e2 Patch from RDB: the ESC[8...t resize sequence and the ESC[18t size
report should both quote rows before columns, not vice versa.

[originally from svn r1534]
2002-01-08 09:56:31 +00:00
Simon Tatham
3ed0d44f16 Retired the #ifdef DUMP_PACKETS stuff in ssh.c because I'm utterly
sick of recompiling to enable packet dumps. SSH packet dumping is
now provided as a logging option, and dumps to putty.log like all
the other logging options. While I'm at it I cleaned up the format
so that packet types are translated into strings for easy browsing.
POSSIBLE SIDE EFFECT: in the course of this work I had to re-enable
the SSH1 packet length checks which it turns out hadn't actually
been active for some time, so it's possible things might break as a
result. If need be I can always disable those checks for the 0.52
release and think about it more carefully later.

[originally from svn r1493]
2001-12-14 14:57:50 +00:00
Simon Tatham
bb1f5cec31 Add support for most of the ESC[<low number>t sequences, which xterm
uses to manipulate the window (minimise, maximise, front, back,
move, resize) and report things about the window (is it minimised or
maximised, how big is it, what's its title). Missing are ESC[4;X;Yt
(resize to a specified pixel size; our resize code doesn't like it)
and ESC[19;X;Yt (report size of _screen_ in _characters_, which it
isn't even obvious how to do when you've got a variable font size).

[originally from svn r1414]
2001-11-25 15:21:25 +00:00
Simon Tatham
d2c9937691 Rectangular-block selection. Enabled by Alt+drag, unless you
configure it to be the default in which case it's _dis_abled by
Alt+drag.

[originally from svn r1350]
2001-10-31 18:50:09 +00:00
Simon Tatham
4badd37b4b Word-by-word (double-click) selection now spans line breaks if the
line break was created by wrapping. (Equivalently, if the selection
would _paste_ as a single word without a newline in the middle, then
it will _select_ in the same way.)

[originally from svn r1347]
2001-10-30 22:02:15 +00:00
Simon Tatham
9bbe53d700 Fix silly scrolling-vs-selection bug: if you selected text on line
9, then did ANSI Delete Line on line 10, the selection highlight
would move up a line even though it wasn't over any text that
actually moved. Easy to reproduce in the likes of vi. Trivial fix.

[originally from svn r1334]
2001-10-28 09:38:43 +00:00
Simon Tatham
cb102602a9 Better robustness in visual bell timeouts: handling GetTickCount
wraparound, not referencing vbell_timeout if in_vbell==FALSE, that
sort of thing. I doubt it'll fix the reported problems with screen
vbells, since none of the failure modes I've just prevented looked
all that probable to me, but it's nice to have extra robustness
anyway.

[originally from svn r1314]
2001-10-23 19:51:23 +00:00
Simon Tatham
7e1272bb53 D'oh, trivial typo which was completely breaking log-all-output.
[originally from svn r1308]
2001-10-12 21:39:16 +00:00
Simon Tatham
39c3f9b8bc Fix pasting of newlines in local line editing mode. Possibly not a
very _good_ fix; something might want doing after the release.

[originally from svn r1277]
2001-09-19 20:07:15 +00:00
Simon Tatham
6364ff3e71 terminal.c's from_backend() no longer calls term_out(), because
term_out() can in turn call ldisc_send() which calls back to
from_backend() when local echo is enabled. This was giving rise to
crazy re-entrancy stuff and stack overflows. Instead from_backend()
deposits its data in a bufchain which term_out() empties the next
time it's called.

[originally from svn r1276]
2001-09-18 19:41:07 +00:00
Simon Tatham
8c532d7668 Fix flaky scrollbar update when scrollback was reset to bottom.
[originally from svn r1275]
2001-09-18 19:04:21 +00:00
Simon Tatham
b4501dec57 Selection point movement on scroll should move selanchor as well as
selstart and selend, otherwise all those worthy ideals go *foom*
while the mouse buttons are held down.

[originally from svn r1274]
2001-09-18 18:59:37 +00:00
Simon Tatham
3d3ef9b8a4 Three more patches from RDB: one to make Atomica work right, one to
fiddle with the widths of characters in DBCS screen fonts, and (the
big one) one to enable a mode in which resizing the window locks the
terminal size and lets the font change, instead of vice versa. That
should shut up a few feature requests!

[originally from svn r1269]
2001-09-15 15:54:24 +00:00
Simon Tatham
6403725639 Scrollback viewing position, and selection endpoints, now keep pace
with the scrollback movement. (The former is of course only
detectable when reset-scrollback-on-activity is disabled.)

[originally from svn r1266]
2001-09-12 20:38:40 +00:00
Simon Tatham
d27684019b Roman Pompejus's patch (heavily hacked) for parametric log file
names with date, time and hostname automatically embedded.

[originally from svn r1255]
2001-09-09 09:58:20 +00:00
Simon Tatham
51eeeae237 Jan Holmen Holsten's patch for drag-selects to scroll the scrollback.
[originally from svn r1252]
2001-09-08 12:37:48 +00:00
Simon Tatham
e2c086b090 RDB's session logging patch: due to some ghastly special case, UTF-8
characters that failed the UTF-8 canonicality rules were being sent
to the session log twice. Sounds trivial, but I bet it'd have
confused anyone who turned on session logging precisely to track
down a canonicality bug :-)

[originally from svn r1244]
2001-09-07 22:51:52 +00:00
Simon Tatham
5fad95e748 Jacob's patch to cause Shift to return to copy-and-paste when xterm
mouse tracking is enabled. (This can be turned off if your app
really wants Shift+mouse, but it defaults to on for general
usefulness.)

[originally from svn r1235]
2001-09-07 20:35:38 +00:00
Simon Tatham
c87fa98d09 Extensive changes that _should_ fix the socket buffering problems,
by ceasing to listen on input channels if the corresponding output
channel isn't accepting data. Has had basic check-I-didn't-actually-
break-anything-too-badly testing, but hasn't been genuinely tested
in stress conditions (because concocting stress conditions is non-
trivial).

[originally from svn r1198]
2001-08-25 17:09:23 +00:00
Simon Tatham
48226525f7 Robert de Bath's implementation of ESC [ Z (backtab)
[originally from svn r1155]
2001-06-23 16:59:00 +00:00
Simon Tatham
9736adfcfa Oops - fixing the line-resizing segfault introduced a new
line-resizing segfault! Remind me to test under Minefield next time.
Should now be fine, as I've just done so.

[originally from svn r1141]
2001-05-21 13:33:12 +00:00
Simon Tatham
38b6d276d2 RDB: fix various UTF-8 glitches.
[originally from svn r1138]
2001-05-19 15:21:05 +00:00
Simon Tatham
26d63c3a96 SCO ACS patch from RDB. Apparently required for the Linux console
terminfo.

[originally from svn r1137]
2001-05-19 14:12:41 +00:00
Simon Tatham
b5a6c88da4 Fix from RDB: patch up mis-aimed fallthroughs in a terminal
emulation switch. (Bug was introduced in mouse reporting.)

[originally from svn r1134]
2001-05-19 11:34:20 +00:00
Simon Tatham
c1f41f9822 Terminal fix from RDB: probably didn't mean to compare a Y value
with a column count!

[originally from svn r1133]
2001-05-19 11:33:03 +00:00
Simon Tatham
df6c9ab083 Small terminal fix from RDB: CSI 1 K should erase the cursor
position itself, as well as everything to the left of it.

[originally from svn r1132]
2001-05-19 11:32:38 +00:00
Simon Tatham
079b6bc6f6 Reinstate the Shift-Ins paste behaviour, which was accidentally
broken by the mouse button redesignation that came with xterm mouse
reporting.

[originally from svn r1130]
2001-05-17 10:06:54 +00:00
Simon Tatham
aca29ffb7b Fix the line-resizing bug in scroll(). (Thanks to RDB for pointing
it out. A line was removed from the scrollback, cleared, and placed
at the bottom of the screen. Fine, except that the clearing process
assumed the line was the right length already, and thanks to lazy
resizing this wasn't necessarily the case. Segfaults and memory
corruption ensued.)

[originally from svn r1129]
2001-05-17 08:53:13 +00:00
Simon Tatham
8e5e0225e5 Scrollbar was failing to update when no scrollback-reset event had happened
[originally from svn r1126]
2001-05-14 13:31:14 +00:00
Simon Tatham
29cce22a90 Fix the sense of posdiff(), causing the extend-selection mouse
action to work correctly again.

[originally from svn r1125]
2001-05-13 16:13:39 +00:00
Simon Tatham
84e58edf9f Glenn Maynard's patch (as adapted by Jacob) for taskbar flashing
when a bell occurs and the window is minimised.

[originally from svn r1123]
2001-05-13 14:42:17 +00:00
Simon Tatham
fb473cc16c Placate gcc's `-Wall' warnings.
[originally from svn r1121]
2001-05-13 14:02:28 +00:00
Simon Tatham
26f1085038 RDB's Unicode patch. Fonts are now used in Unicode mode where
possible and we have a single unified means of trying to display any
Unicode code point. Instead of the various ad-hoc translation modes
we had before, we now have a single `codepage' option which allows
us to treat the incoming (and outgoing) text as any given character
set, and locally we map that to Unicode and back.

[originally from svn r1110]
2001-05-10 08:34:20 +00:00
Simon Tatham
7d86bbfbe2 From RDB: a few extra escape sequences seen in SCO terminals.
[originally from svn r1106]
2001-05-09 13:35:08 +00:00
Simon Tatham
9318b84598 Fix due to Robert de Bath: backspace should not cross line
boundaries when auto wrap is disabled.

[originally from svn r1101]
2001-05-09 12:48:01 +00:00
Simon Tatham
3730ada5ce Run entire source base through GNU indent to tidy up the varying
coding styles of the various contributors! Woohoo!

[originally from svn r1098]
2001-05-06 14:35:20 +00:00
Simon Tatham
93101b5a71 Wez Furlong's patch to add xterm mouse reporting and proper mouse
wheel support.

[originally from svn r1097]
2001-05-06 14:20:41 +00:00
Simon Tatham
059998d17b Remove diagnostics and attempt to work around VC compiler bug :-(
[originally from svn r1096]
2001-05-03 10:10:53 +00:00
Simon Tatham
56a5e6fdf3 Extra diagnostics in the hope that we can track down the problem with
the nightlies. I must remember to take it all out again when we do!

[originally from svn r1095]
2001-05-02 14:45:25 +00:00
Simon Tatham
321adcb4b9 The bell overload times are now measured in milliseconds, although
the config box still enters them in seconds (it allows fractions).

[originally from svn r1089]
2001-04-28 15:47:26 +00:00
Simon Tatham
296cad5962 Remove stray diagnostics. When will I learn?
[originally from svn r1088]
2001-04-28 15:33:48 +00:00
Simon Tatham
fc56312b45 Implement lazy horizontal resizing of screen and scrollback.
[originally from svn r1087]
2001-04-28 15:32:25 +00:00
Simon Tatham
9525da2826 Arrange that explicit visual bells performed using ESC[?5h and
ESC[?5l in immediate succession will still give a visibly long flash
of the screen.

[originally from svn r1086]
2001-04-28 14:39:16 +00:00
Simon Tatham
34d2d98bdd Two more small bugs introduced by the B-tree reorg: scroll() now
requires fix_cpos() to be called after it (otherwise cpos might point
to a line that isn't where you remember it being), and a mis-aimed
incpos() was causing forward selection dragging not to include the
char under the mouse. Both fixed.

[originally from svn r1063]
2001-04-17 09:25:52 +00:00
Simon Tatham
04b2c2b53e Fix alternate-screen bugs introduced by move to B-trees. Alternate
screen wasn't being correctly cleared on creation, and also wasn't
inhibiting scrollback like it should have.

[originally from svn r1061]
2001-04-17 08:53:31 +00:00
Simon Tatham
3abea3d4ea Having now compiled the last few days' changes with MSVC, it's turned
up a bunch of warnings, mostly unused variables. All fixed.

[originally from svn r1058]
2001-04-17 08:24:29 +00:00
Simon Tatham
559b00b90a Terminal now uses unsorted counted tree234 as its basic data type.
Should speed up scrollback to usable levels no matter how big your
scrollback buffer.

[originally from svn r1055]
2001-04-16 21:25:13 +00:00
Simon Tatham
f6ea0f9396 Oops - remove rogue debug messages!
[originally from svn r1040]
2001-04-13 11:01:56 +00:00
Simon Tatham
a8116a8dae New improved bell handling. Choice between visual and audible bell;
configurable bell overload handling. Thanks to Robert de Bath for
galvanising me into doing this, but I've had to rip most of his code
out and redo it myself...

[originally from svn r1039]
2001-04-13 10:52:36 +00:00
Simon Tatham
ac5bebc71d Jordan Russell's patch to match the PuTTY cursor blink rate to the
system-configured one.

[originally from svn r1036]
2001-04-11 10:03:46 +00:00
Simon Tatham
8e91c62bfa We can now configure the terminal's answerback string when it receives ^E.
[originally from svn r1031]
2001-04-09 12:43:46 +00:00
Simon Tatham
2c39b69a52 Default handling of VT100 line drawing characters in cut and paste is
now to translate them into poor man's characters (+--+ and |). We also
have an option to disable this (and map line drawing characters to the
corresponding ASCII code as before). Thanks to Robert de Bath.

[originally from svn r1029]
2001-04-09 11:59:35 +00:00
Simon Tatham
7a79df8fe6 Rethink the whole line discipline architecture. Instead of having
multiple switchable line disciplines, we now have a single unified
one which changes its behaviour based on option settings. Each
option setting can be suggested by the back end and/or the terminal
handler, and can be forcibly overridden by the configuration. Local
echo and local line editing are separate, independently switchable,
options.

[originally from svn r895]
2001-01-24 14:08:20 +00:00
Simon Tatham
d9de560388 The `wrapnext' variable now states whether we _would_ wrap next
character if we were wrapping, not whether we _will_ wrap next
character. Makes for saner behaviour with vertical-line cursor and
also when changing autowrap mode while on rightmost column. Does
entail small behavioural changes to backspace and destructive-
backspace when in rightmost column with Auto Wrap off, but I don't
think they should be catastrophic, or indeed that there's a well
defined Right Behaviour.

[originally from svn r872]
2001-01-17 17:25:58 +00:00
Simon Tatham
c68959b584 Introduce alternative cursor shapes: underline, vertical line
[originally from svn r870]
2001-01-17 16:57:33 +00:00
Simon Tatham
48b368d3ed Disable logging completely if the user selects Cancel when told the
file already exists

[originally from svn r851]
2001-01-08 16:24:13 +00:00
Simon Tatham
3a2a06b1fc Improved session logging courtesy of Roman Pompejus
[originally from svn r846]
2001-01-07 18:24:59 +00:00
Simon Tatham
d75f3687fb Correct pointer types in new clipme function
[originally from svn r812]
2000-11-24 22:27:51 +00:00
Simon Tatham
9147f68fb6 Ron Kuris's "copy everything to clipboard" patch
[originally from svn r808]
2000-11-21 19:28:25 +00:00
Simon Tatham
384eeb3f76 Fix miscellaneous compiler warnings. Thanks to Jacob Nevins
[originally from svn r755]
2000-10-24 10:47:49 +00:00
Simon Tatham
bbbda4110b Created a shiny new abstraction for the socket handling. Has many
advantages:
 - protocol modules can call sk_write() without having to worry
   about writes blocking, because blocking writes are handled in the
   abstraction layer and retried later.
 - `Lost connection while sending' is a thing of the past.
 - <winsock.h> is no longer needed in most modules, because
   "putty.h" doesn't have to declare `SOCKET' variables any more,
   only the abstracted `Socket' type.
 - select()-equivalent between multiple sockets will now be handled
   sensibly, which opens the way for things like SSH port
   forwarding.

[originally from svn r744]
2000-10-23 10:32:37 +00:00
Simon Tatham
6eb613e3c4 Three new configurable options:
- Robert de Bath's Compose key is now off by default and configurable on
 - The ages-old controversy over whether ALT by itself should bring the
   System menu up is now controllable by a config option
 - You can now independently configure whether scrollback resets on a
   keypress _and_ whether it resets on screen activity.

[originally from svn r741]
2000-10-21 16:30:58 +00:00
Simon Tatham
e32603347c Introduce a sane interface function, from_backend(), for backends to
use when they have data from the network. Replaces the utterly daft
inbuf / inbuf_head / term_out() interface, which only made sense
when feeding to terminal.c. (terminal.c now implements
from_backend() as a small function that gateways to the old
interface.)

As a side effect, from_backend() also has an `is_stderr' parameter,
so scp can once again separate the server's pronouncements on stderr
from the actual protocol progress on stdout.

[originally from svn r729]
2000-10-20 13:51:46 +00:00
Simon Tatham
a80fa10287 Remember to update scrollbar when scrollback is reset
[originally from svn r727]
2000-10-20 12:31:02 +00:00
Simon Tatham
fe2ee468e6 Turn off paste-as-poorman for line drawing chars until it's configurable
[originally from svn r702]
2000-10-10 16:02:08 +00:00
Simon Tatham
b5957e5732 Scroll regions of two lines are allowed
[originally from svn r700]
2000-10-10 10:50:14 +00:00
Simon Tatham
fd5588d087 Robert de Bath's big patch:
- cope with strange WinSock wrappers not supporting SIOCATMARK
  - define yet more terminal compatibility modes
  - support UK-ASCII (just like US-ASCII but # is a sterling sign)
  - support connection keepalives at a configurable interval

[originally from svn r692]
2000-10-09 12:53:32 +00:00
Simon Tatham
e48981def4 Miscellaneous fixes to try to make other compilers happier
[originally from svn r691]
2000-10-09 12:19:09 +00:00
Simon Tatham
7b6106d62a Add a parameter to write_clip() so that windlg.c need not call term_deselect
[originally from svn r681]
2000-10-06 12:32:25 +00:00
Simon Tatham
4f3def030a Add an invisible System Caret for blind-helper-software to track
[originally from svn r627]
2000-09-25 16:17:53 +00:00
Simon Tatham
bed673083b Yet another pedantic fix for scroll margin setting :-)
[originally from svn r586]
2000-09-11 14:47:57 +00:00
Simon Tatham
0d5d39064a Robert de Bath's Big Patch, part 1
[originally from svn r516]
2000-07-26 12:13:51 +00:00
Simon Tatham
7a01fd48b6 Make beep optional - thanks to Antal Novak
[originally from svn r507]
[this commit reordered to come after creation of 0.49 tag]
2000-06-24 17:00:49 +00:00
Simon Tatham
e0fac426c5 Hack to work around the rootshell.com xterm DoS problem. A better
fix might be possible, but it's unclear whether this is a productive
strategy in the long term.

[originally from svn r495]
2000-06-05 16:33:58 +00:00
Simon Tatham
7d85289621 Patch to RDB's blinking cursor: make it configurable and by default
off. It's terribly distracting.

[originally from svn r423]
2000-03-17 10:46:59 +00:00
Simon Tatham
693e51c934 RDB's patch. Oodles of new terminal functionality, including
ATTR_BLINK (as bold background) and VT52 support. Plus a
compatibility tracking system whereby all escape sequences can be
disabled for a pure-VT102 compatibility mode or other levels.

[originally from svn r421]
2000-03-17 10:39:05 +00:00
Simon Tatham
30ee1109f1 Robert de Bath's patch: ARG_DEFAULT is now zero because it's
apparently defined behaviour for _all_ CSI-type sequences that ESC[Q
should be equivalent to ESC[0Q. Which is a pain in the wossname and
not a sane way to do it, but if the standards say it then I suppose
... :-(

[originally from svn r406]
2000-03-11 14:16:55 +00:00
Simon Tatham
118524f442 Robert de Bath's patch: be a little more careful of main and
alternate screens when resizing the window. Should avoid lines of
alternate screen showing up in scrollback buffer.

[originally from svn r403]
2000-03-11 14:10:10 +00:00
Simon Tatham
06060def52 Robert de Bath's patch: sort out once and for all the confusion
between ESC [ ... Q and ESC [ ... ? Q (for all values of Q).

[originally from svn r402]
2000-03-11 14:08:36 +00:00
Simon Tatham
9e6856ef8e Oops - that unscroll stuff was a little broken...
[originally from svn r348]
1999-12-09 17:10:28 +00:00
Simon Tatham
396d6cd422 Turn #ifdef LOG into a command-line option for debugging use
[originally from svn r330]
1999-11-30 11:22:30 +00:00
Simon Tatham
97b5df1691 Oops - fix total idiocies in applying that patch
[originally from svn r329]
1999-11-30 11:13:33 +00:00
Simon Tatham
a8d5838ebc Robert de Bath's multi-purpose patch, slightly modified.
- ^E answerback is now `PuTTY'.
 - The framework is now in place for the scrollback to reset to
   bottom on display _or_ keyboard events _or_ both. An actual
   configurable option isn't yet present, but most of the code is in
   place.
 - Try to deal with the problems where incoming data gets dropped
   after decoding but before display.
 - Scrollback behaviour has changed: instead of keying it off
   `scroll' versus `delete top line', things now go into the
   scrollback from _either_ of those but only if the primary screen
   is selected. Should fix problems with `less' and talkers.
 - must_update variable has gone because rdb correctly observed that
   it didn't seem to be doing a great deal :-)

[originally from svn r328]
1999-11-30 10:52:07 +00:00
Simon Tatham
429b6f4a83 Added local-editing line discipline to make raw backend usable
[originally from svn r287]
1999-11-09 12:05:34 +00:00
Simon Tatham
e913e99b40 Oleg Panashchenko's Cyrillic support patch
[originally from svn r277]
1999-11-08 11:08:09 +00:00
Simon Tatham
97731141ad Fix misparse of ESC[?9r sequence; I must find out what it _should_ do
[originally from svn r176]
1999-07-07 13:16:41 +00:00
Simon Tatham
9a5b63aa03 Allow CSI 0;0r to set default scroll region (previously did nothing useful)
[originally from svn r85]
1999-03-11 10:27:12 +00:00
Simon Tatham
0fc1c0c9c9 Improve drag select (dragging outside LHS doesn't now select first
char too)

[originally from svn r20]
1999-01-22 09:36:21 +00:00
Simon Tatham
e68a529cc9 Add SSH don't-allocate-pty option, and corresponding LF-implies-CR
terminal setting

[originally from svn r16]
1999-01-15 11:30:40 +00:00
Simon Tatham
3352f57942 Fix breakage in window redraw
[originally from svn r14]
1999-01-15 11:28:11 +00:00
Simon Tatham
60ab6a5d82 John Sullivan's patches plus more fixes:
- Stop using the identifier `environ' as some platforms make it a macro
  - Fix silly error box at end of connection in FWHACK mode
  - Fix GPF on maximise-then-restore
  - Use SetCapture to allow drag-selecting outside the window
  - Correctly update window title when iconic and in win_name_always mode

[originally from svn r12]
1999-01-08 13:10:19 +00:00
Simon Tatham
c74130d423 Initial checkin: beta 0.43
[originally from svn r11]
1999-01-08 13:02:13 +00:00