2008-06-23 20:16:34 +0100 / mad / revision 1435
TODO: Another TODO item done, albeit not entirely satisfactorily.
2008-06-23 18:40:59 +0100 / mad / revision 1434
TODO: Half the .wxs file is now duly deleted.
2008-06-23 07:06:45 +0100 / enh / revision 1433
man/1/terminator.1: fix hyphen/minus confusion.
2008-06-22 22:45:41 +0100 / mad / revision 1432
TODO: Delete the done parts of the Terminator Here item.
2008-06-19 09:10:16 +0100 / mad / revision 1431
TODO: I decided some time ago to go down the cygwin-launcher path and I don't think I'll be coming back, so I don't think the chere.exe and run.exe notes are of more than historical interest. I thought it would be straightforward to turn burgaud.com's blog entry into .wxs but, as ever, nothing related to the Windows installer is ever simple. Add copious notes and snippets on this evening's time-suck. I'll be back to delete them again once I find the time to work out a way forwards.
2008-06-08 05:31:13 +0100 / enh / revision 1430
src/terminator/LogWriter.java: FindBugs complains of potential concurrent calls to a non-thread safe DateFormat. Synchronize to ensure we don't use the SimpleDateFormat concurrently from multiple threads (not that it was likely, given that we only use it when creating a new LogWriter).
2008-06-07 05:46:45 +0100 / enh / revision 1429
src/terminator/terminal/escape/EscapeParser.java: FindBugs complains about using "new Character" instead of "Character.valueOf", but we may as well let auto-boxing do the right thing for us.
2008-06-07 05:43:19 +0100 / enh / revision 1428
src/terminator/view/JTerminalPane.java: FindBugs complains about inner classes that could be static but aren't.
2008-05-12 16:52:06 +0100 / mad / revision 1427
native/all/pty/PtyGenerator.h: http://www.win.tue.nl/~aeb/linux/lk/lk-10.html#ss10.3 confirms my suspicion, which had already been reinforced by comments in an earlier version of our source ("44BSD way to acquire controlling terminal"), that the TIOCSCTTY ioctl is the BSD approach for acquiring the controlling terminal. Linux, it confirms, tries to support both models and should work fine with our current code. Cygwin's source only appears to support the System V approach. Another early comment suggests it would be a bad idea to call TIOCSCTTY on "SunOS" but we seem to be getting away with it on Solaris.
I've now had a look at the libvte4 source and seen that, like our current code, it doesn't use O_NOCTTY when opening the slave tty in the child process. It uses it on the master open, as we do. At the time of the change that first introduced O_NOCTTY to our source, we didn't pass it to the master open. That was fixed when we switched to posix_openpt. Perhaps O_NOCTTY was simply added to the slave open when the intention was to add it to the master. I doubt we'll be able to find out this many years later but I'm now more confident that my changes of yesterday aren't going to be a regression.
2008-05-12 04:05:23 +0100 / mad / revision 1426
native/all/pty/PtyGenerator.h: Revert part of a change from 2005-09-17 that "doesn't seem to break anything", now that we've discovered it breaks tcsh on Cygwin because it leaves the child's process group with no controlling terminal. Mac OS and Linux both define TIOCSCTTY and so we make that ioctl call on both of those operating systems. Judging from what it says on the tin, that's what's been saving them. I doubt that this will break those operating systems but I'll be testing them presently. It might break Solaris, which was the aegis under which the change was made. I doubt that, because it was flagged as unnecessary but "in all the usual suspects' source".
2008-05-12 03:49:38 +0100 / mad / revision 1425
native/all/pty/PtyGenerator.h: Paul S Strauss reports that we produce an empty window when starting with SHELL=tcsh on Cygwin. Telling Terminator to have $SHELL then run bash produced an error message about the process having been suspended for doing terminal input from the background. That set me on the right track. Indeed, tcsh had been stopped. The addition of some printf debugging showed that tcgetpgrp() in the child was still returning the parent process's id. That's not right - the terminal's process group should be that of the child. I don't know how it's working so well when that's not the case. I'm betting that it is the case on Linux and Mac OS and I think I know why and I think I know how to fix it but I'm getting ahead of myself. We have a (presumably cheap) check that will test whether we've set up the terminal in the way we intend, so let's make that check and refuse to run further if it's not working. This breaks the Cygwin Terminator but, by checking it in, I'll more easily be able to test whether it works on Mac OS and Linux, which would explain why we we're not seeing such problems there.
2008-05-07 18:44:46 +0100 / mad / revision 1424
src/terminator/LogWriter.java: We only use ptyName in a Log.warn. Supplying it has caused a problem to our one caller. We expose all the information that our caller would need in order to do the Log.warn itself. Let's do that to stop the caller having to jump through exceptional hoops.
src/terminator/terminal/TerminalControl.java: We no longer need to explicitly use the pty name at all, as it's included in the ptyProcess.toString() output. We will now indicate in the application log that we've been unable to open the terminal log because the logs directory is unwritable. That sounds like an improvement to me. Now we definitely need a code-comment.
2008-05-07 18:26:21 +0100 / mad / revision 1423
src/terminator/terminal/TerminalControl.java: Elliott suggests a code comment, since he says (and I think he's right) that this isn't the first time we've broken the reporting of this particular error.
2008-05-07 17:43:07 +0100 / mad / revision 1422
src/terminator/terminal/TerminalControl.java: In contradiction of my check-in comment of "2008-01-10 09:01:09 -0800 mad (1389)", I now see how we can get output on the terminal before we create the InputStreamReader - from announceConnectionLost. Ensure that we create a LogWriter even when creating the PtyProcess throws an exception. The ptyName is only used for writing into the application log, so it doesn't matter what we choose as a name in this circumstance. Creating a LogWriter earlier, then replacing it, would create spurious and confusing extra log files. Fixes:
2008-05-07T23:42:16.620+1200 Terminator: Couldn't say "java.lang.UnsatisfiedLinkError: Failed to load libpty.so from /usr/share/software.jessies.org/terminator/Resources/terminator/.generated/sun4u_SunOS/lib
at e.util.FileUtilities.loadNativeLibrary(FileUtilities.java:394)
at terminator.terminal.PtyProcess.ensureLibraryLoaded(PtyProcess.java:63)
at terminator.terminal.PtyProcess.<init>(PtyProcess.java:106)
at terminator.terminal.TerminalControl.initProcess(TerminalControl.java:89)
at terminator.view.JTerminalPane.init(JTerminalPane.java:157)
at terminator.view.JTerminalPane.<init>(JTerminalPane.java:60)
at terminator.view.JTerminalPane.newShellWithName(JTerminalPane.java:108)
at terminator.Terminator.getInitialTerminals(Terminator.java:239)
at terminator.Terminator.access$200(Terminator.java:13)
at terminator.Terminator$3.run(Terminator.java:181)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at e.debug.EventDispatchThreadHangMonitor.dispatchEvent(EventDispatchThreadHangMonitor.java:191)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
[Couldn't initialize terminal: UnsatisfiedLinkError.]"
Associated exception:
java.lang.NullPointerException
at terminator.terminal.TerminalControl.processBuffer(TerminalControl.java:314)
at terminator.terminal.TerminalControl.announceConnectionLost(TerminalControl.java:282)
at terminator.view.JTerminalPane$1.run(JTerminalPane.java:165)
at java.lang.Thread.run(Thread.java:595)
(That double-spacing is because the original is LF CR spaced, deliberately, by us, in handleProcessTermination.)
2008-05-02 15:43:14 +0100 / enh / revision 1421
native/all/pty/PtyGenerator.h: Vasile Rotaru points out that putenv(3) takes char*, not const char*, and GCC 4.2 no longer considers string literals to be writable. Rather than cast, as in Vasile's patch, let's take the opportunity to switch to setenv(3), as POSIX recommends, and which takes const char* as it should. Tested on Ubuntu 7.10 with g++-4.2 installed.
2008-02-29 06:27:57 +0000 / mad / revision 1420
www/faq.html: RedHat users will likely want that infocmp line from our Cygwin recommendations. CentOS was where I was fighting with sudo last time and we just had a query from a CentOS user. Let's mention that CentOS is really RedHat.
2008-02-24 22:24:51 +0000 / enh / revision 1419
TODO:
www/faq.html: I started rewriting my example Bash script in Ruby and, looking for clarification of something, came across the nautilus-open-terminal plug-in, which seems like a better solution. Document how to use that to start Terminator, both now and in the near future (when it will become significantly easier, though for the somewhat distressing reason that there's a different terminal emulator called Terminator that's just gone in to the Debian "universe" repository).
2008-02-24 04:21:09 +0000 / mad / revision 1418
TODO: Proof of concept for a Windows implementation of "Terminator Here".
2008-02-24 01:18:31 +0000 / enh / revision 1417
TODO: document how to add "Open Terminator Here" functionality to Nautilus.
2008-02-23 23:19:30 +0000 / enh / revision 1416
src/terminator/terminal/TerminalControl.java:
src/terminator/view/JTerminalPane.java: switch to a slightly trickier implementation of the "should we make this a login shell?" test so that user-supplied -e commands are left unadulterated, as they should be, regardless of their content.
2008-02-23 04:25:05 +0000 / enh / revision 1415
src/terminator/terminal/TerminalControl.java: mad points out that the 1970s convention wasn't to set argv[0] to "-", but to prefix argv[0] with "-". Correct that (though we haven't yet seen anything that looks beyond the first character) and add a comment about the non-universality of the very concept of "login shell".
2008-02-23 04:16:10 +0000 / enh / revision 1414
www/faq.html: avoid unfortunate adjacent parentheses.
2008-02-23 04:13:28 +0000 / enh / revision 1413
www/faq.html: be consistent about alphabetical ordering even after adding "Fedora" as a synonym for "RedHat".
2008-02-23 04:11:02 +0000 / enh / revision 1412
www/faq.html: move the RedHat-specific suggestion out into a subsection for RedHat-specific problems (and assume they apply to Fedora too), move all the system-specific suggestions below the general suggestions, rename the system-specific suggestions to make it clearer that's what they are, and rename "logging into remote systems" because – as Charles Roper points out – the problems occur after you've logged in. Explicitly mentioning SSH, which is what most people will be using, in the heading should make the section more obviously relevant.
2008-02-22 23:02:54 +0000 / mad / revision 1411
bin/terminator: Don't change ARGV when trying to use the TerminatorServer. There's no need to - the code's just as simple without. More seriously, it causes us to do the wrong thing if the TerminatorServer doesn't work, which it won't if, for example, Terminator isn't already running. What was I thinking?
2008-02-22 07:09:43 +0000 / mad / revision 1410
www/faq.html: Charles Roper had no infocmp. I expect I got mine as a prerequisite of rxvt, because that's what Cygwin complained about when I uninstalled ncurses to prove Elliott's correct suggestion that infocmp was provided by that package.
2008-02-22 06:04:39 +0000 / enh / revision 1409
native/all/pty/PtyGenerator.h:
native/all/pty/terminator_terminal_PtyProcess.cpp: offer an interface more like the underlying execvp(3) call, with a separate executable name and initial argv, rather than assuming that argv[0] is the executable name.
src/terminator/terminal/PtyProcess.java: offer the same interface on the Java side.
src/terminator/view/JTerminalPane.java: move the code that attempts to ensure a login shell...
src/terminator/terminal/TerminalControl.java: ...down a level. This lets us use the 1970s trick of setting argv[0] to "-" when starting a shell to inform it that it's a login shell. Why? Because tcsh(1) is so broken that "-l" (which we were already using instead of Bash's "--login" for portability's sake) can only appear on its own.
src/terminator/LogWriter.java: while touching all this code, I think it makes sense to pass the List<String> around further (because that's the newer idiom), especially now the String[] we have conveniently available will be mangled into unsuitability for the LogWriter's purposes in most cases.
2008-02-12 06:54:40 +0000 / enh / revision 1408
www/faq.html: Braden Anderson tried to follow our advice, but it didn't work because his remote machine was a Mac. Fix the documentation so it works for other Mac users.
2008-02-08 07:01:21 +0000 / enh / revision 1407
www/faq.html: enp disliked "be being".
2008-02-08 05:13:46 +0000 / enh / revision 1406
www/faq.html: I started off just fixing the typo "The right fix is fix the", but ended up simplifying the whole paragraph to use more direct language. A lot of our readers are non-native speakers. One change I considered but didn't make was replacing "your shell's profile" with "one of your shell's start-up files". The latter's more strictly correct (and a reminder to the reader that they should check they haven't forgotten one of the potentially numerous files, and should read their shell's man page if they're not sure what their shell reads), but I felt it distracted from the thrust of the paragraph and that "profile" might actually be more meaningful to the kind of reader who'd need this advice.
2008-02-07 23:29:12 +0000 / mad / revision 1405
src/terminator/view/TerminalView.java: If I set height = 0 here, Terminator silently fails to start, like it does for Marc Paterno, with:
java.lang.ArithmeticException: / by zero
at terminator.view.TerminalView.getVisibleSizeInCharacters(TerminalView.java:229)
at terminator.view.JTerminalPane.updateTerminalSize(JTerminalPane.java:240)
at terminator.view.JTerminalPane.optionsDidChange(JTerminalPane.java:128)
at terminator.view.JTerminalPane.init(JTerminalPane.java:154)
at terminator.view.JTerminalPane.<init>(JTerminalPane.java:60)
at terminator.view.JTerminalPane.newShellWithName(JTerminalPane.java:108)
at terminator.Terminator.getInitialTerminals(Terminator.java:239)
at terminator.Terminator.access$200(Terminator.java:13)
at terminator.Terminator$3.run(Terminator.java:181)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at e.debug.EventDispatchThreadHangMonitor.dispatchEvent(EventDispatchThreadHangMonitor.java:191)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
We should at least give the user an opportunity to change the font, now we have a shiny interface for doing so. Why our new friend's font has zero height remains to be determined.
2008-02-06 18:17:27 +0000 / mad / revision 1404
www/faq.html: I've done battle with vim-minimal at least twice now. It took me quite some investigation to decide that this simple solution is probably best. We could instead advise the setting of $EDITOR, but a symlink works system-wide. If you're installing Terminator, you probably don't even want vim-minimal, but you don't want to lose sudo!
Try also to discourage any passing Nigel from trying to set term (sic) to terminator in his shell profile. I still think it was a good idea to explain the problem, even though it did lead to someone trying to compound a felony that hadn't actually been committed.
2008-02-03 01:46:07 +0000 / enh / revision 1403
src/terminator/TerminatorTabbedPane.java:
src/terminator/view/JTerminalPane.java: Selcuk Duman points out that we were claiming that you could switch to the tenth tab with (on Linux) "Alt-10". Sadly, his keyboard doesn't have a "10" key any more than mine does. This patch (a) moves responsibility for translating key to tab into TerminatorTabbedPane, where the translation from tab to key already lived, and (b) extends the translations to add the key 0 after 9, as on the keyboard.
2008-01-27 23:06:18 +0000 / mad / revision 1402
src/terminator/LogWriter.java: Insert "for" to go with "have undocumented". The point - that we have users with unwritable logs directories - risks getting lost if the sentence gets much longer.
2008-01-27 20:19:49 +0000 / enh / revision 1401
src/terminator/LogWriter.java: slightly simplify the control flow after discussion on the mailing list. I've slightly expanded on the comments too, to make some of the things that came up in the discussion more explicit.
2008-01-21 22:53:12 +0000 / mad / revision 1400
src/terminator/LogWriter.java: Replacing this tricksy while loop with a for loop is an uncontroversial move towards simplicity or at least idiom. The canWrite thing needs a comment and we're close to agreement, and perhaps agreed, on what it should say. canWrite may move but the comment can easily follow.
2008-01-21 19:03:34 +0000 / enh / revision 1399
src/terminator/LogWriter.java: we only need one DateFormatter for the whole of Terminator, and we never change it, so it should be "static final". We can also manage a better name; "LOG_TIMESTAMP_FORMATTER" was my first choice, but that's not as clear as "FILENAME_TIMESTAMP_FORMATTER" in the context of a class that's all about logging, where there's only one interpretation of "filename" but where "log" could refer to the filename or the file's contents. Also switch to the ISO-approved "T" separator between the date and time portions; I appear to read dates right-to-left, judging by how often I'd read the hour part of the time as the day part of the date. Finally (for this single line) add a comment explaining why we don't just use our usual ISO date formatter.
The word "stem" in filename contexts usually refers to the leafname without an extension, so let's say "leafname" where we mean leafname. We may as well have the helper put together the whole filename, too, and return it as the appropriate Java object — the ever-misleading File.
Finally – for this patch – add a comment explaining why there's so much code for such a seemingly simple task.
2008-01-18 18:15:53 +0000 / mad / revision 1398
bin/terminator: Ron Pagani points out that invoke-java.rb throws an exception trying to create the terminator-server-port.secret file if ~/.terminator doesn't exist. If the dot directory doesn't exist, I can't see it being worth trying to continue. No-one's ever going to want to run like that (until someone explains why) so it's a code path that won't get tested and will rust. Our supported method of permanently disabling logging is to make the logs directory unwritable. So I think it's safe to assume, if make_directory fails to create or find the directory, that we should exit with failure.
2008-01-18 17:47:59 +0000 / enh / revision 1397
src/terminator/Terminator.java: Terminator has changed in 2008, so update the copyright date. Also give ourselves some minimal credit.
2008-01-18 01:21:13 +0000 / enh / revision 1396
src/terminator/Terminator.java:
src/terminator/TerminatorMenuBar.java: e.util.Preferences can do the preferences menu item stuff itself now.
2008-01-10 22:14:01 +0000 / mad / revision 1395
bin/terminator: Our new friend sadly just has the usual suspicion that logs cost too much and aren't outweighed by the benefit. Still, others have asked for different colors for different terminals, and a customizable .terminator directory would facilitate that too. It's easily implemented, simple, robust and non-intrusive.
2008-01-10 18:31:49 +0000 / mad / revision 1394
src/terminator/LogWriter.java: Put the loop in the right place, to avoid hard-coding 255 (in perhaps the wrong place). Annoyingly, both "File name too long" and "Permission denied" are of type FileNotFoundException.
2008-01-10 18:03:45 +0000 / mad / revision 1393
src/terminator/LogWriter.java: Get rid of nesting complexity by using an early return for the case where the log directory doesn't exist, so I can see more clearly where the loop belongs.
2008-01-10 18:00:15 +0000 / mad / revision 1392
src/terminator/LogWriter.java: We can't have that much complexity for something that doesn't work for Korean. A loop should avoid duplication and plus-or-minus-one errors, providing that no reasonable system actually limits us to fewer than 255 characters, er, bytes. Uh-oh, what is Benny doing here? The encoder isn't turning a string into bytes. It's just a URL encoder.
2008-01-10 17:48:37 +0000 / mad / revision 1391
src/terminator/LogWriter.java: Switch the timestamp and the prefix, as Elliott suggests (the reason for them being that way round, if it were recorded at all, is before an accidental file deletion - so it's hard to get out of svn). Elliott wasn't desperately keen on prematurely fixing the "File name too long" issue but Sam Bayer's still asking for a way of disabling logging, perhaps because he doesn't like the untidy exception message. Well, it does look like a bug.
Elliott suggested trying to truncate to 255 characters but then I'd have to duplicate ".txt" or abstract it out and I'd still risk plus-or-minus one errors. If I do the truncation before the UTF-8 encoding, then I won't split a UTF-8 character. Hmm, that's perhaps not much comfort to any Koreans running 101 character commands that encode to 303 bytes.
We shouldn't have two ways of reporting unexpected exceptions from initLogging. Either it's worth raising a dialog for (as the caller does if we let the exception leak) or it's only worth logging and ignoring. Let's go with the former, now we no longer know about any unexpected exceptions. I introduced the latter case yesterday, so I'm just tidying up my own mistake.
2008-01-10 17:09:25 +0000 / mad / revision 1390
src/terminator/LogWriter.java: Elliott points out that, while we don't disambiguate already extant log file names, using sub-second precision timestamps in the name would be a good idea.
2008-01-10 17:01:09 +0000 / mad / revision 1389
src/terminator/terminal/TerminalControl.java: I don't see how we can get any output from the terminal before we create the InputStreamReader, so we can defer the creation of the LogWriter until we know the pty name which, as Sam Bayer points out, might be usefully written to the application log or used in the terminal log name.
src/terminator/LogWriter.java: Writing the pty name and the terminal log name to the application log is clearly a good idea. And the suggester doesn't even want logging!
Elliott suggests that we might want to put the timestamp before the command line, so restrict the term "prefix" to the method body that decides to use it as a prefix (and avoid the misleading impression in the calling code that the argument isn't escaped).
2008-01-10 01:48:50 +0000 / mad / revision 1388
src/terminator/LogWriter.java: What should we do about this FIXME?
2008-01-10 01:37:32 +0000 / mad / revision 1387
src/terminator/LogWriter.java: Create the flushing timer even if we can't create a BufferedWriter because, for example, we've given it a "File name too long". That way, flushTimer won't be null when we come to append():
Associated exception:
java.lang.NullPointerException
at terminator.LogWriter.append(LogWriter.java:68)
at terminator.terminal.TerminalControl.processBuffer(TerminalControl.java:287)
at terminator.terminal.TerminalControl.access$300(TerminalControl.java:17)
at terminator.terminal.TerminalControl$ReaderRunnable.run(TerminalControl.java:129)
at java.lang.Thread.run(Thread.java:619)
2008-01-09 18:40:23 +0000 / mad / revision 1386
src/terminator/LogWriter.java: As Sam Bayer notes, not being able to create the log file doesn't necessarily mean that the directory isn't writable. Log the real reason and store a less presumptive message for the Show Info box... unless Java is convinced that the directory isn't writable. That is how we tell people to disable logging, so we should just report it in Show Info as before and not log anything.
2008-01-09 18:14:56 +0000 / mad / revision 1385
src/terminator/InfoDialog.java: We're telling the log writer to suspend logging, not just to set some state variable.
src/terminator/LogWriter.java: We have this NullWriter thing, so why the blazes do we still have writer != null checks and, as Sam Bayer demonstrates, null pointer exceptions? Let's have the invariant that writer != null, and stick to it, removing spurious checks and one double assignment to writer (firstly to null and then to NullWriter.INSTANCE, for no obvious reason). Rename setSuspended per the InfoDialog change and rename the parameter so it doesn't look like we're testing whether we're already suspended. Try to simplify things by collapsing as many of the references to null as possible.
2007-12-26 21:40:10 +0000 / enh / revision 1384
src/terminator/Options.java: remove the old custom preferences implementation...
src/terminator/TerminatorPreferences.java: ...and switch to the new general-purpose system. More of this (the color scheme presets, for example) may move into the general-purpose implementation later, but for now Terminator has quite a bit of custom code here.
src/terminator/model/StyledText.java:
src/terminator/TerminatorMenuBar.java:
src/terminator/view/CursorBlinker.java:
src/terminator/view/highlight/SelectionHighlighter.java:
src/terminator/view/JTerminalPane.java:
src/terminator/view/TerminalView.java:
src/terminator/view/VisualBellViewport.java: track trivial API changes.
src/terminator/TerminatorFrame.java: it's no longer possible to have no menu bar, so this code gets simpler.
src/terminator/Terminator.java: -xrm no longer works, so quietly ignore -xrm arguments. The most significant change here, though, is that colorBD is no longer a hidden preference. No-one's complained all these years that they don't have manual control over the bold color, so let's assume we were doing a good job of picking one automatically and make it not-at-all a preference rather than sort-of one. (Note that since all Terminator windows share the same settings – which is either a feature or a bug, depending on what you're trying to achieve – we can take the easy route of adding this to Terminator rather than having to deal with it in each JTerminalPane. If Terminator ever does gain per-terminal preferences/overrides, this code will need to move.)
man/1/terminator.1: update the documentation.
2007-12-16 23:57:51 +0000 / enh / revision 1383
src/terminator/TerminatorFrame.java: Jukka P Laurila reports experiencing Sun bug 6526971 when using Terminator on Windows, so apply the work-around. It has a minor side-effect (that you can no longer keep our menu up if focus moves to another window), but that seems less likely to be troublesome than dodgy alt-tab behavior. I wasn't even aware you could keep a menu up with focus given to another window.
2007-12-13 21:04:07 +0000 / mad / revision 1382
src/terminator/view/JTerminalPane.java: Record my findings this morning, prompted by Jukka Laurila's query about Emacs. I see I've had a ~/playpen/getch.cpp lying around for who-knows-how-long. Implausible though this code looks, I'm still leaning towards thinking that it's right.
2007-11-25 19:36:58 +0000 / enh / revision 1381
src/terminator/Options.java: remove support for named colors and remove a comment that's already been moved to a better home in AnsiColors. We've long since dropped support for parsing a user's Xresources or Xdefaults, and -xrm is broken and deprecated. Anyone who fixes the latter can easily re-add this. For now, though, it's more useful to simplify this class so we can switch to reusing the new preferences code I'm working on for Evergreen and FatBits.
2007-11-23 01:17:06 +0000 / enh / revision 1380
src/terminator/model/Location.java: update for generics.
2007-11-14 04:08:37 +0000 / enh / revision 1379
src/terminator/Options.java:
src/terminator/view/VisualBellViewport.java: don't use Class.cast unless it's actually necessary.
2007-11-14 02:36:27 +0000 / enh / revision 1378
src/terminator/Options.java: Ed points out that the current Mac OS 10.4 "os.version" is "10.4.10".
2007-11-13 19:03:30 +0000 / enh / revision 1377
src/terminator/Options.java: on Mac OS 10.5, the old "toolbar" button type has gone, and "gradient" seems the best replacement for our purposes.
2007-11-13 19:02:39 +0000 / enh / revision 1376
src/terminator/TerminatorFrame.java:
src/terminator/TerminatorTabbedPane.java: Tom Duffey and Curtis Thompson both reported ugly problems when closing tabs on Mac OS 10.5; it turns out that JTabbedPane is now non-opaque by default. Also, for reasons I don't understand, the "originalBackground" trick doesn't work, but it's not necessary on Mac OS anyway, so just refrain from messing with the background altogether on Mac OS.
2007-11-12 17:51:32 +0000 / mad / revision 1375
bin/terminator: We've hit this problem at least four times now. Time to start trying to work-around it. We use :preserve => true because we want to copy the mtime but it fails while chown()ing. There is no option to say copy the mtime without the ownership. FileUtils.touch() doesn't let us specify the mtime. Touching either of them afterwards would defeat the purpose documented in the code-comment earlier in this method - of comparing compilation times.
2007-11-12 06:28:36 +0000 / mad / revision 1374
Makefile: Use the newly preferred path for simple.make.
2007-11-05 17:20:11 +0000 / mad / revision 1373
bin/terminator: John Congdon reports ENOTDIR "/Users/jcongdon/.terminator/terminator-server-port/tmp/launch-EzhQSv/_0.secret" when Terminator on Leopard tries to connect to the in-app server. Replace any slashes in $DISPLAY with underscores, like we do for colons.
2007-10-17 05:55:10 +0100 / enh / revision 1372
www/faq.html: include the Cygwin FAQ item.
2007-10-12 06:54:01 +0100 / enh / revision 1371
src/terminator/Terminator.java:
src/terminator/view/JTerminalPane.java: support XTerm-like -e and -T.
man/1/terminator.1: document the fact.
2007-10-12 05:34:21 +0100 / enh / revision 1370
src/terminator/TerminalDropTarget.java: Παναγιώτης Κατσαλούλης (Panayotis to those viewing in ASCII) points out that the "new File(new URI(uri))" trick for handling dropped files is currently broken on Mac OS where we're getting a URI list containing URIs of the form file://localhost/whatever and URI is taking the "localhost" as the authority, and File is insisting on no authority. "file" URIs have always been problematic for exactly this reason; I assume Apple's addition of "localhost" is accidental.
2007-10-05 06:18:00 +0100 / enh / revision 1369
src/terminator/Options.java:
src/terminator/terminal/escape/CSIEscapeAction.java:
src/terminator/TerminalDropTarget.java:
src/terminator/view/TerminalView.java: fix various uncontentious warnings, involving raw types, unused parameters to private methods, and unnecessary casts.
2007-10-04 06:53:22 +0100 / enh / revision 1368
src/terminator/model/TerminalModel.java:
src/terminator/Terminator.java:
src/terminator/TerminatorServer.java:
src/terminator/TerminatorTabbedPane.java:
src/terminator/view/TerminalView.java:
src/terminator/view/VisualBellViewport.java: remove unused locals and fields.
src/terminator/terminal/TerminalControl.java: remove a "throws" declaration for an exception that can't be thrown.
2007-10-04 06:21:30 +0100 / enh / revision 1367
src/terminator/CommandDialog.java:
src/terminator/FindDialog.java:
src/terminator/Frames.java:
src/terminator/model/TerminalModel.java:
src/terminator/terminal/PtyProcess.java:
src/terminator/terminal/TerminalControl.java:
src/terminator/Terminator.java:
src/terminator/TerminatorFrame.java:
src/terminator/TerminatorMenuBar.java:
src/terminator/view/CursorBlinker.java:
src/terminator/view/JTerminalPane.java:
src/terminator/view/VisualBellViewport.java: remove unused imports.
2007-10-03 21:19:20 +0100 / mad / revision 1366
bin/terminator: Remove dependency on a deleted salma-hayek file that we were no longer actually using. It was originally used here to find tic(1). We no longer call tic here. I got rid of that call "2006-04-27 22:35:36 -0700 mad (1054)" under the less than helpful comment "bin/terminator: FIXME fixed". Trying to find that in the history gives me a new appreciation of why users of these centralized revision control systems always write exactly what they're changing in the check-in comments. Even with a distributed system, though, it would have been useful to have mentioned "tic" or "terminfo".
2007-10-02 18:36:38 +0100 / mad / revision 1365
TODO: We don't want to be relying on BlueArc's misc for holding Terminator TODO information and it would be better if we didn't have to grovel in the history.
2007-10-02 18:31:34 +0100 / mad / revision 1364
TODO: Copy FIXMEs from a salma-hayek script which is about to be killed off.
2007-09-22 01:07:45 +0100 / enh / revision 1363
native/all/pty/PtyGenerator.h:
src/terminator/terminal/TerminalControl.java: it might be easier to quote like 'this' than like "this" in source, but the former looks weird.
2007-09-22 00:27:37 +0100 / enh / revision 1362
TODO: mad's fixed the "ubygems" problem, and installer problems belong in salma-hayek's to-do list anyway. Add a few more jobs from my inbox.
2007-09-22 00:22:35 +0100 / enh / revision 1361
src/terminator/Terminator.java: "terminator --help" doesn't open a window, so we need to manually stop the GNOME startup notification or it'll hang around until it times out.
2007-09-22 00:16:14 +0100 / enh / revision 1360
man/1/terminator.1: man page for the "terminator" start-up script.
2007-09-22 00:15:27 +0100 / enh / revision 1359
man/1: new directory.
2007-09-22 00:14:33 +0100 / enh / revision 1358
man: new directory.
2007-09-18 20:14:49 +0100 / enh / revision 1357
TODO: no-one had a cunning plan, so get this bug report out of my inbox and onto the TODO list.
2007-09-12 06:15:01 +0100 / enh / revision 1356
src/terminator/view/JTerminalPane.java: finish the job of adding modifiers to the cursor, editing keypad, and function keys.
2007-09-11 06:23:40 +0100 / enh / revision 1355
src/terminator/view/JTerminalPane.java: Thomas Wolff is the first person to ask for function key modifiers, and there was no reason they hadn't already been implemented except lack of need, so it's time to add them. As usual, the irregularity of the function key sequences is an annoyance, but at least the modifier section is roughly the same for all of them.
2007-09-11 00:56:09 +0100 / enh / revision 1354
src/terminator/view/JTerminalPane.java: Thomas Wolff points out that we need to update the kernel's idea of the terminal's size not only when the user resizes the UI but also when the user changes the preferences such that the same number of pixels now contains more or less text.
2007-09-11 00:42:45 +0100 / enh / revision 1353
native/all/pty/terminator_terminal_PtyProcess.cpp: Chris Reece reports a bug where doing the terminal-resizing ioctl(2) on fd -1 on Cygwin causes a crash. Playing about, "exec sleep 10", hitting interrupt, and then resizing the window turns out to be the easiest way to reproduce (and though it's not fatal on Linux, it will let you see an ioctl(2) failure there). I've added similar protection to nativeRead and nativeWrite though I don't think we can ever get there (because we abort the Executor that would make the calls).
2007-09-01 03:15:13 +0100 / enh / revision 1352
src/terminator/Options.java:
src/terminator/TerminatorFrame.java: add configurable opacity for Linux (with Compiz) and Mac OS.
2007-08-15 04:53:39 +0100 / enh / revision 1351
src/terminator/terminal/escape/CSIEscapeAction.java:
src/terminator/terminal/escape/EscapeParser.java:
src/terminator/terminal/escape/SingleCharEscapeAction.java:
src/terminator/terminal/escape/TwoCharEscapeAction.java:
src/terminator/terminal/escape/XTermEscapeAction.java: ensure we always escape escape sequences we output as part of debugging information or error messages, ensure we always supply exactly what we saw when reporting that something's "unrecognized", and remove some unnecessary duplication Phil added: toString shouldn't be duplicating any of the sequence interpretation code.
2007-08-14 20:18:39 +0100 / pcn / revision 1350
src/terminator/terminal/escape/CSIEscapeAction.java:
src/terminator/terminal/escape/SingleCharEscapeAction.java:
src/terminator/terminal/escape/TwoCharEscapeAction.java:
src/terminator/terminal/escape/XTermEscapeAction.java: Add toString methods to all our TerminalActions, so that when eventually we have some proper, in-depth stream debugging, we can see exactly what's coming down the line.
2007-08-13 00:18:25 +0100 / enh / revision 1349
src/terminator/Options.java: give the user a hint as to when they should think about using the "Use alt key as meta key" option.
2007-07-24 05:01:25 +0100 / enh / revision 1348
lib/terminator.ico: conversion of the 128x128 icon via GIMP.
2007-07-21 04:45:51 +0100 / enh / revision 1347
lib/terminator-128.png:
lib/terminator-32.png:
lib/terminator-512.png:
lib/Terminator.icns: new icons from Sébastien Pierre.
2007-07-14 06:46:02 +0100 / enh / revision 1346
native/all/pty/terminator_terminal_PtyProcess.cpp: follow the "throw by value, catch by const reference" rule.
2007-07-04 21:11:10 +0100 / enh / revision 1345
src/terminator/CommandDialog.java: make page up/page down scroll the history in this dialog.
2007-07-04 06:49:52 +0100 / enh / revision 1344
src/terminator/view/TerminalView.java: add another Stopwatch to measure the whole redraw. About 90% (that's a measured figure) of this time is actually in TextLine.getStyledTextSegments. Disappointingly, adding a "break" to the "charsLeftBeforeSplit == 0" case there doesn't make much of an improvement to our performance, which makes me wonder how much we'd gain from writing our own iterator rather than filling a collection as we currently do.
2007-07-04 06:40:51 +0100 / enh / revision 1343
src/terminator/model/TextLine.java: make it possible to pass in a "width hint" so that the result contains a larger number of shorter segments...
src/terminator/view/TerminalView.java: ...so we can manually "clip" to that granularity, and avoid the cost of trying to render an arbitrary amount of text. 200 200KiB lines, for example, goes from 4 minutes down to 1 minute on one x86 machine I tested on. The next step is probably to change TextLine.getStyledTextSegments to return an iterator rather than a collection, so we don't actually do any more work than we need to.
2007-07-01 06:03:50 +0100 / enh / revision 1342
src/terminator/model/TerminalModel.java:
src/terminator/view/TerminalView.java: optimize the common case of modelToView for the location one past the end of the line. This saves about 15% on the "200 200KiB lines" test. Also manually inline a method with only one caller, for clarity rather than performance reasons.
2007-07-01 05:34:05 +0100 / enh / revision 1341
src/terminator/terminal/TerminalControl.java: implement an exception-safe variant of martind's idea for preventing us from reading too far ahead and queuing up too much work for the EDT. I think we should do more work on the reader thread, and less on the EDT, but that's actually a harder change than you'd imagine because at the moment we have lots of TerminalAction subclasses that run on the EDT and queue up more work in the terminalActions collection to be run later on the EDT. Plus we'd need to do more work to make sure we're not redrawing too much, if the EDT were freer to get round to more redrawing.
2007-07-01 01:25:00 +0100 / enh / revision 1340
src/terminator/model/TerminalModel.java:
src/terminator/model/TextBuffer.java:
src/terminator/terminal/escape/CSIEscapeAction.java:
src/terminator/terminal/escape/SingleCharEscapeAction.java:
src/terminator/terminal/escape/TwoCharEscapeAction.java:
src/terminator/terminal/escape/XTermEscapeAction.java:
src/terminator/terminal/TerminalAction.java:
src/terminator/terminal/TerminalControl.java:
src/terminator/view/highlight/FindHighlighter.java:
src/terminator/view/highlight/SelectionHighlighter.java:
src/terminator/view/TerminalView.java: another name change for clarity's sake.
TODO: same, plus a new bug.
2007-07-01 01:15:26 +0100 / enh / revision 1339
src/terminator/FindDialog.java:
src/terminator/InfoDialog.java:
src/terminator/model/TextBuffer.java:
src/terminator/terminal/TerminalControl.java:
src/terminator/TerminalDropTarget.java:
src/terminator/TerminatorFrame.java:
src/terminator/TerminatorMenuBar.java:
src/terminator/view/CursorBlinker.java:
src/terminator/view/FindBirdsEye.java:
src/terminator/view/highlight/FindHighlighter.java:
src/terminator/view/highlight/Highlighter.java:
src/terminator/view/highlight/SelectionHighlighter.java:
src/terminator/view/JTerminalPane.java:
src/terminator/view/JTextBuffer.java:
src/terminator/view/TerminalView.java: start improving some of the naming. We've lived with confusing terminology for too long.
2007-06-29 00:44:22 +0100 / mad / revision 1338
src/terminator/model/TextLine.java: Fixing another off-by-one error knocks another 10s off my previous just-over-a-minute time for:
ruby -e 'repeatingString = "0123456789"; repeatedString = repeatingString * (20 * 1000); (0...200).each() { |lineNumber| puts(repeatedString); }'
He says, finally remembering to get the test code in the revision history.
2007-06-29 00:11:54 +0100 / mad / revision 1337
src/terminator/view/JTextBuffer.java: This knocks the time down for my 200 lines of 200 000 bytes test case from ~200s to ~65s. We were using nCopies(n, " ") on the last line. When the last line's 200 000 bytes long, that's a lot of copies.
2007-06-29 00:06:15 +0100 / enh / revision 1336
src/terminator/view/JTextBuffer.java: it's cheaper to pass a String to nCopies than anything else.
2007-06-28 23:00:58 +0100 / mad / revision 1335
src/terminator/view/highlight/FindHighlighter.java: Hoist up the shortcut test for our having no pattern. For my 200KB line test, we get called fifty times per line. I did see this on my poor man's Ctrl-\ profile, even with no find expression, though it didn't appear very often. The majority of my pain lies elsewhere but this is an easy win.
2007-06-23 05:35:54 +0100 / enh / revision 1334
www/index.html: remove the reference to -xrm, which interacts so badly with the preferences that we shouldn't encourage people to use it.
2007-06-23 05:12:05 +0100 / enh / revision 1333
www/index.html: one exclamation mark per bullet point is more than enough.
2007-06-12 01:46:24 +0100 / mad / revision 1332
native/all/pty/terminator_terminal_PtyProcess.cpp: Resurrect a note about Solaris, which we now allege to support.
2007-06-12 01:38:53 +0100 / mad / revision 1331
native/all/pty/terminator_terminal_PtyProcess.cpp: Really fix the problem whereby reusing the now-free pty causes us to think that we have active children when we're dead. The fd gets reused too, which is why the previous method didn't work, so explicitly mark the fd as closed when we're done with it...
src/terminator/terminal/PtyProcess.java: ... and make sure it's in that state to start with, just in case we never get as far as starting the child.
2007-06-11 23:31:13 +0100 / mad / revision 1330
native/all/pty/terminator_terminal_PtyProcess.cpp: That didn't work reliably on Cygwin. Perhaps it wouldn't work reliably elsewhere. Revert to blocking until the child exits...
src/terminator/terminal/PtyProcess.java: ... after having the insight that we could use a different single-threaded executor for each child. This still gives us the Linux 2.4 work-around but allows us to block this thread without stopping us from creating new children or waiting for other children. The gotcha is that we have to remember to stop the executor or else we leak (daemon) threads.
This would let us remove the "contact lost" clause and the "result == 0" check of the returned value from waitpid. But if we did ever hit that "child being traced" case and the window just disappeared, we'd kick ourselves.
Anyway, time to check this on Cygwin...
2007-06-11 22:26:44 +0100 / mad / revision 1329
native/all/pty/terminator_terminal_PtyProcess.cpp: The only place we currently call nativeWaitFor is when we've given up reading from the pipe to the child but that doesn't necessarily mean that the child has died. My motivating case was when Terminator ran out of heap due to a script continuously outputting but another case would be that a child goes into daemon mode and closes all of its standard i/o descriptors. WNOHANG should stop us tying up the single thread we use to run JNI code (for Linux 2.4 compatibility) providing that it compiles on all the platforms we support. It works on Linux and compiles on Mac OS. I'll try Cygwin when I've checked-in.
src/terminator/terminal/TerminalControl.java: handleProcessTermination has several early returns. Shutting down the writer thread is the least important thing we're doing but we should nevertheless make an effort to do it in each code path. (If we're worried about it throwing exceptions and stopping us from executing something else, then we'll have to trap them, but I'm not sure we really are worried.) The pseudo-switch on the exit status was previously complete except for the unlikely case that WIFSTOPPED, which can only happen if "the child is being traced". With WNOHANG, though, we might well return when the child hasn't exited normally and when it hasn't been signaled, so we now need to handle that case. A more informative message might be useful but I hope no-one will ever see this case anyway. (It might be unlikely but locking up the whole Terminator process is such an unfortunate consequence that I think the expected damage is worth trying to fix, particularly given that it's not really costing us much extra code or complexity.)
2007-06-11 21:43:41 +0100 / enh / revision 1328
src/terminator/CommandDialog.java: martind complains that if you hit Enter when the dialog appears, we try to run the empty command. There are various choices: report an error to the user, cope with the empty command as being a request for a new shell, disabling Enter and the "Run" button until there's a non-empty command, or running the currently-selected command. Our various dialogs differ, but "re-run my last command" sounds like a plausibly desirable default action (and better than running bash -c ''), so let's start with that.
2007-06-10 21:21:30 +0100 / mad / revision 1327
src/terminator/terminal/TerminalControl.java: The SingleThreadExecutor we use for working around a problem with Linux 2.4 means that any bugs in how we call the JNI code can easily lock up the whole Terminator process. We already log some output when waitFor returns but, if it doesn't return, you can be left at a loss as to why not, even if you've discovered the sudo killall hsdbd; sudo jstack nonsense that's necessary on Mac OS to extract the less informative (no thread names) version of the thread dump. So add to the log spam to point the finger.
The instance of this bug that I tripped over happened when the reader ran out of heap space. Flag that in the source code, where we start to go down a code path that isn't necessarily right, though handleProcessTermination may be the expedient place to fix it. When considering whether we want another early return, I see that we're not cleaning up the writerExecutor in the case we take an early return. That doesn't look right, so it gets a flag too.
I was actually glad that Java ran out of memory here, though it didn't stop the previously unheard of degree of fan racket from the normally nearly silent Mac Book. I thought I'd killed the ruby script doing continuous output that I'd started in order to try, unsuccessfully, to reproduce the increasingly annoying cross-platform bug with Copy (whereby Copy sometimes seemingly does nothing). I hadn't and, by the time we came back from the Taiwanese bakery with a delicious banana and walnut cake, it was good bye Terminator with event dispatch hangs lasting several seconds. Killing the ruby script finally stopped the noise.
Right, so do we try to fix this in nativeWaitFor, or do we trap a more specific exception or do we abandon that work-around or make it specific to Linux or what? The first option sounds most robust to me, so I'm off to work out how we'd do that.
2007-05-24 06:50:27 +0100 / enh / revision 1326
www/index.html: set all the variables at the start, so I can use them in the #included fragments without worrying whether or not they've been set by that point.
2007-05-21 17:25:46 +0100 / enh / revision 1325
src/terminator/TerminatorTabbedPane.java: another Java 5 build fix; MouseAdapter only covers MouseListener in Java 5, instead of MouseListener and MouseMotionListener. Also, the drag-to-reorder tab behavior doesn't work with Mac OS' LAF (as I predicted but forgot to test), so disable it there.
2007-05-21 06:53:20 +0100 / enh / revision 1324
src/terminator/TerminatorTabbedPane.java: work around that Java 5 compiler bug again. (Annoyingly, we can't deprecate building on Java 5 until Apple releases Java 6.)
2007-05-21 00:45:29 +0100 / enh / revision 1323
src/terminator/TerminatorTabbedPane.java: a reasonable imitation of gnome-terminal's drag-to-reorder tab behavior.
2007-05-20 20:06:39 +0100 / enh / revision 1322
src/terminator/TerminatorTabbedPane.java: add "Move Tab Right" and "Move Tab Left" to each tab ear's pop-up menu too. I also meant to say that it was Yan Qiao who suggested we make it possible to reorder tabs.
2007-05-20 19:55:42 +0100 / enh / revision 1321
src/terminator/TerminatorTabbedPane.java: add a method to move a tab; factor out the Java 5 compatibility code into separate methods now there are multiple callers.
src/terminator/TerminatorMenuBar.java: add "Move Tab Left" and "Move Tab Right" actions to the "Window" menu. Document the keystroke choice, and correct an apparent error in our claims for konsole's switch-tab keystrokes (stupidly, konsole's manual isn't available on-line).
src/terminator/view/JTerminalPane.java: implement the compatibility (konsole and gnome-terminal) keystrokes. Fix the existing keystroke handling to not accidentally (from my point of view) claim some of the keystrokes we now need. This implies a behavior change, but the old behavior was never advertised, and was contrary to other popular terminals, so it's unlikely anyone was using those keystrokes.
src/terminator/TerminatorFrame.java: forwarding for the move-tab functionality.
2007-05-20 17:51:51 +0100 / enh / revision 1320
src/terminator/TerminatorMenuBar.java: track API change.
2007-05-20 07:28:12 +0100 / enh / revision 1319
src/terminator/TerminatorMenuBar.java: track API change.
2007-05-20 06:40:14 +0100 / enh / revision 1318
www/index.html: "cross-platform" is fundamental to jessies.org.
2007-05-20 06:34:11 +0100 / enh / revision 1317
www/index.html: balance the introductory text better.
2007-05-20 01:53:04 +0100 / enh / revision 1316
www/faq.html:
www/index.html: remove the old "Running" section now pretty much everything "just works", moving the remaining oddments to better homes.
2007-05-20 01:31:10 +0100 / enh / revision 1315
www/index.html: add a navigation bar.
2007-05-17 17:57:22 +0100 / mad / revision 1314
www/faq.html: Although, strictly speaking, no-one seems to ask this question, we could do ourselves a favor by encouraging our users to make themselves heard. If the Cygwin people don't get any complaints, they won't even consider changing.
2007-05-13 04:46:08 +0100 / enh / revision 1313
src/terminator/view/VisualBellViewport.java: use Mac OS' built-in visual bell if we can, because it looks a lot nicer than ours.
2007-05-10 22:43:41 +0100 / enh / revision 1312
src/terminator/view/JTerminalPane.java: explain why we use "-l" rather than "--login" here.
2007-05-10 16:55:39 +0100 / mad / revision 1311
www/faq.html: On Cygwin, the problem isn't "how do I get the window title to change?", it's "how do I stop the window title from changing?". That's at least the second time that Cygwin's /etc/profile has caused us a problem. Yan Qiao was confused about which program was getting in his way and I can't say I blame him.
2007-05-08 06:29:26 +0100 / enh / revision 1310
src/terminator/TerminatorMenuBar.java: Chris Reece reports that if he closes all his windows on his iBook, then hits C-T repeatedly in quick succession, he doesn't get all his new tabs in the same new window, as he'd expect. Looks like an event queue ordering problem, and I wasn't able to find a better solution than this hack. But this is small and contained, and it works on my dual G5, so it'll do for now.
2007-05-08 01:37:39 +0100 / mad / revision 1309
src/terminator/view/JTextBuffer.java: Min Xu's taken to running mutt in screen and, when I do that and re-attach to screen (as our friend describes), the horizontal scrollbar jumps right. I think this is because mutt likes to leave the cursor just off the right of the bottom line and because the cursor moved there just after I stopped typing. This makes my heuristic think that the typing caused the output and so the user would like to see the cursor position in order to see what they're typing. But they can't see the cursor, because mutt makes it invisible. Why would you ever want to scroll to see an invisible cursor?
Contrary to what I just told our friend, this is unlikely to address whatever's caused infelicitous horizontal scrolling for me. I'm not sure I ever use any applications which make the cursor invisible. It might make us bombproof against horizontal scrolling in mutt, which is what our friend really wants.
2007-05-06 04:14:03 +0100 / enh / revision 1308
www/faq.html: expand upon the visual bell options and the reasoning behind them.
2007-05-04 01:12:39 +0100 / mad / revision 1307
www/faq.html: Yan Qiao's the second user in as many days to have visual bell trouble. He kicked himself for not finding the options but perhaps the term "visual bell" isn't well known to Windows users. He suggested adding it to the FAQ and, by definition, he's got a point.
2007-04-30 19:25:57 +0100 / mad / revision 1306
bin/terminator: Lose the "Insecure world writable dir" warning work-around to salma-hayek, where it should now benefit the other projects too.
2007-04-30 18:44:46 +0100 / mad / revision 1305
bin/terminator: The Cygwin launcher support is moving to invoke-java.rb, because it's not Terminator-specific. Only Terminator currently needs it but that's not a very good reason to have it in the wrong place. We'd like an individual project's launcher script to be as simple as possible.
2007-04-30 06:33:24 +0100 / enh / revision 1304
TODO: update the notes on transparency.
2007-04-30 01:48:31 +0100 / enh / revision 1303
www/faq.html: document the current font situation, including the findings of Chee-Keong Cheng, because I don't think we can realistically do much to automatically improve things.
2007-04-29 20:06:09 +0100 / enh / revision 1302
www/faq.html: our most frequently asked question is probably the cursor keys question, but the FAQ entry is very long and complicated (subdivided into other sections), and not obviously relevant unless you already have some understanding of the problem. So let's start the FAQ with a tiny entry that gives the reader confidence that they're heading in the right direction and then points them to the full entry.
2007-04-28 18:55:12 +0100 / enh / revision 1301
bin/terminator: document the sad truth about /bin/sh.
2007-04-28 06:33:53 +0100 / enh / revision 1300
bin/terminator: use report_exceptions.
2007-04-28 06:11:23 +0100 / enh / revision 1299
bin/terminator: fix a FIXME and warn users if we were unable to create or secure a directory that's important to us.
2007-04-27 18:15:33 +0100 / mad / revision 1298
bin/terminator: We can revert to plain exit(), now show_uncaught_exception() knows to ignore SystemExit exceptions.
This reduces the number of calls of exit!() to zero.
2007-04-26 04:27:35 +0100 / enh / revision 1297
src/terminator/CommandDialog.java: car doesn't like this dialog's single-click behavior as much as he thought it would, and asks that it be removed. (When he asked for the functionality, he didn't realize that you could copy and paste from the list to the text field, and now he knows, he thinks that's adequate.)
2007-04-25 07:49:28 +0100 / enh / revision 1296
www/faq.html: add mention of problems Emacs users might face.
2007-04-23 05:24:00 +0100 / mad / revision 1295
src/terminator/terminal/PtyProcess.java: Use the new way of loading native libraries, which only looks in our .generated tree, but looks in all the directories in that tree which contain shared libraries. Makes the i386 Terminator package work on an amd64 kernel with an i386 JVM.
2007-04-21 20:56:06 +0100 / enh / revision 1294
www/index.html: if car's going to the trouble of packaging for Solaris and is actually using Terminator on his Solaris laptop, let's not exclude Solaris whenever we talk about supported platforms.
2007-04-21 20:53:29 +0100 / enh / revision 1293
www/index.html: reformat to one sentence per line, for my editing convenience. One paragraph per line would be second best, but arbitrarily hard-wrapped to a variety of widths is just annoying.
2007-04-21 05:43:13 +0100 / enh / revision 1292
src/terminator/Options.java: car suggests dropping the word "color" from all the color preferences, which is redundant now the colors are all on a "Color" tab, to reclaim some space on small displays. While I'm here, flip the UI so the presets come first, to strengthen the impression that you're supposed to pick a preset, not waste your life fiddling with the individual colors. Also add some space between the preset and custom halves of the tab, to make things a little less ugly.
2007-04-20 06:30:06 +0100 / enh / revision 1291
src/terminator/terminal/TerminalControl.java: now I've made us fast, the synchronous "read-one, process-one" style is fast enough to behave no worse than the competition when handling a large paste. We don't see every character echoed back, but every character makes it to the reading process, and it's characters from the middle that appear to be missing (as opposed to character from the end when Terminator was slow), so no-one will notice, just like they've never noticed that all the competing terminal emulators seem to drop characters. So let's dump the extra complexity and go back to the simple synchronous model.
2007-04-16 02:39:55 +0100 / enh / revision 1290
src/terminator/Options.java: keep all color constants in the usual hex form.
2007-04-16 02:35:13 +0100 / enh / revision 1289
src/terminator/Options.java: all the green-on-black Terminator users I know (both of them) use this pea-green rather than full green, so let's offer something that we know is used in the wild. Personally, I rather like this with a 0x001100 background, but still not enough that I could imagine using it, and anyone who wants that kind of thing is probably using jwz's phosphor(1) rather than Terminator!
2007-04-15 21:09:35 +0100 / enh / revision 1288
src/terminator/model/TextLine.java: document the fact that experiment shows that String is overall probably a better choice than StringBuilder at the moment, and summarize the specific findings and trade-offs.
2007-04-13 06:32:53 +0100 / car / revision 1287
lib/SunOS/preinstall: Build a big ugly PATH from a number of sensible sources. If /usr/bin/ruby doesn't exist, trawl the big ugly PATH to find the first ruby, install a symbolic link. Otherwise, exit, thus aborting package install.
lib/SunOS/postinstall: Build a big ugly PATH from a number of sensible sources. Trawl it looking for tic, install terminator.tic as widely as possible.
2007-04-13 06:29:26 +0100 / car / revision 1286
lib/SunOS: Somewhere to keep install scripts.
2007-04-11 20:20:00 +0100 / enh / revision 1285
bin/terminator: exit quietly, without raising an exception.
2007-04-11 05:06:59 +0100 / enh / revision 1284
bin/terminator: say who we are.
2007-04-10 06:34:59 +0100 / enh / revision 1283
bin/terminator: actually, let's discourage having any code outside the class.
2007-04-10 06:30:40 +0100 / enh / revision 1282
bin/terminator: stick all the code into a class, fix the indentation to be four spaces, and wrap all the code with a rescue block so we can actually present an error to the user if something goes wrong before the Java starts. (I tried to run Terminator on Windows today, and failed, and had to run it from the command line with debugging output turned on. Real users shouldn't have to mess around with nonsense like that.)
2007-04-09 06:02:18 +0100 / enh / revision 1281
src/terminator/Options.java: because I dislike the idea of having options that one of the developers isn't living with, and because none of us are, as far as I know, users of white text on a black background, I've been using this on my Mac ever since. It's okay, especially with a semi-transparent terminal (which has the side-effect of making the black less black), but the selection color has been killing me. I would have switched to Color.GRAY, but that's the color we use for the selection in an unfocused window, and that seemed confusing, and is aesthetically even less pleasing than the blue we were using. Color.DARK_GRAY works well, though, even if this color scheme keeps making me want to turn off all the lights.
2007-04-08 05:23:18 +0100 / enh / revision 1280
src/terminator/model/TextLine.java: remove dead code and fix a copy-and-pasted name.
2007-04-08 04:39:48 +0100 / enh / revision 1279
src/terminator/model/TextBuffer.java: remove a big chunk of dead code with questionable performance characteristics (should it ever get called in future).
2007-04-08 03:49:43 +0100 / enh / revision 1278
src/terminator/AnsiColor.java:
src/terminator/model/StyledText.java:
src/terminator/Options.java: pull the "standard" ANSI colors (which you're not allowed to modify anyway) out of Options and into their own class, and stop referring to them by name when really they're an integer-indexed collection.
2007-04-07 23:53:30 +0100 / enh / revision 1277
src/terminator/terminal/TerminalControl.java: in ancient times, when Terminator used a separate process for the back-end, rather than JNI, we also had a strange scheme where we would keep reusing the same buffer, rather than having one buffer per read as we do these days. That was removed long ago, but the code to wait while each buffer's worth was handled on the EDT remained. It turns out that for all of my benchmarks, we've been spending almost all our time in processBuffer, because that was indirectly calling EventQueue.invokeAndWait. There may be code that was relying on our old behavior, but I haven't found any, and it's code we should fix. The immediate effect of this on my machine is that Terminator's now about ten times faster; the difference is enough that it's now painful to use the old version. It's embarrassing that it's taken so long to find this. When I added a Stopwatch to processBuffer, the problem was obvious, but this was invisible on a profile, and my assumption until now had been that the rendering code itself must contain the problem, rather than the problem being lock-step synchronization between the processing and the rendering.
2007-04-07 06:53:36 +0100 / enh / revision 1276
src/terminator/model/StyledText.java: these two methods are just implementation details, and can be private.
2007-04-07 06:28:55 +0100 / enh / revision 1275
src/terminator/view/JTextBuffer.java: use the new HorizontalScrollWheelListener, and fix up our Scrollable implementation to scroll horizontally by a more sensible amount (arrived at by experimentation, and coincidentally appears to be roughly what Apple do).
www/index.html: document the new feature, albeit subtly.
2007-04-06 07:29:18 +0100 / enh / revision 1274
src/terminator/terminal/TerminalControl.java: I noticed in passing that we're wasting time and space by not making PlainTextAction static.
2007-04-06 07:20:02 +0100 / enh / revision 1273
src/terminator/terminal/TerminalControl.java:
src/terminator/TerminatorTabbedPane.java: Scott Wells reports that switching between two newly-created tabs in a newly-created window with Java 6 on Windows was causing the terminals to resize. I could reproduce this with Java 7 on GNOME, where the problem was that the spinner is now too tall for a default-height tab, so the appearance of the spinner was reducing the amount of space for the terminal. Thinking about it, even when a GTK LAF bug meant that the tab was plenty tall enough, I used to be annoyed by the horizontal jiggling of the tabs as spinners came and went. So I've modified JAsynchronousProgressMeter so I can tell it not to paint its content, and I've switched to using that instead of setVisible.
2007-04-05 23:32:15 +0100 / enh / revision 1272
src/terminator/terminal/TerminalControl.java: don't flush if there's nothing to flush. Also switch to spinning the spinner one step for each block of input, rather than once for each line, which still had a tendency to cause it to spin too fast. (Before the fix to only flush when necessary, we were always spinning at least two steps per line.)
2007-04-05 22:39:03 +0100 / enh / revision 1271
src/terminator/view/JTerminalPane.java: fix the pop-up menu's information about the selection on Mac OS. I've renamed getSelectedText to be less misleading.
src/terminator/view/highlight/SelectionHighlighter.java: remove a TODO now it's done.
2007-04-05 22:20:30 +0100 / enh / revision 1270
src/terminator/view/highlight/SelectionHighlighter.java: bring this code into line with the similar PTextArea code. (It doesn't currently matter here, but it's easy to imagine it might in future.)
2007-04-05 06:56:23 +0100 / enh / revision 1269
www/faq.html: add answers to a couple more reasonably common questions.
2007-04-05 00:19:22 +0100 / enh / revision 1268
doUnpleasantThings: this doesn't do anything useful on Mac OS or Ubuntu, and I'd hazard a guess it's not much better on Windows. The working equivalent would be "man perlfunc", and we're pretty good at that these days. We're slightly faster than GNOME Terminal on my machines, though Terminal.app is twice as fast.
2007-04-04 23:49:15 +0100 / enh / revision 1267
src/terminator/TerminatorFrame.java: Scott Wells points out that our special case for not expanding a maximized window off the edge of screen when adding the tab pane is insufficient; we need to cope with the case where the window is simply very tall. This is only needed on Windows, because GNOME and Mac OS both automatically constrain our window size request. I haven't tested this on Windows myself, but mad has.
2007-04-04 20:34:42 +0100 / enh / revision 1266
src/terminator/terminal/TerminalControl.java: factor out some duplication in the thread creation, remove a unnecessary else in the reader (because the parser now wants to see some sign of end-of-input), ensure that no matter how the reader terminates it signals end-of-input to the parser, and shut down the writer ExecutorService too. This prevents leaks of parser and writer threads (readers would always terminate because their next read would fail).
2007-04-04 08:23:17 +0100 / enh / revision 1265
src/terminator/terminal/TerminalControl.java: add an important note, likely to be helpful should the input queue changes cause trouble.
2007-04-04 07:32:09 +0100 / enh / revision 1264
src/terminator/terminal/TerminalControl.java: better documentation, and make it clear that the encoding is a constant.
2007-04-04 06:43:37 +0100 / enh / revision 1263
src/terminator/terminal/TerminalControl.java: previously, we had one thread for writing and one thread for reading & processing read data. Split the latter into two separate threads. There's a reason for this other than just elegance; it appears that, on both Linux and Mac OS (I haven't tested anything else), when we make a large paste (30KiB seems to be plenty), we lose data if we don't read fast enough. We can try writing slower, but it's not obvious what the magic numbers for chunk size and pause between chunks should be, so this lets us read faster (because we can read ahead of where we've got to with the processing). The downside is that this is only an amelioration rather than a fix (we can still lose data, though we seem to lose a lot less, and it seems to be from the middle rather than the end, so it's less likely that the user notices). Note that it's only data echoed back to us that goes missing. So if the user was pasting in to "cat > some-file.txt", their file will contain all the pasted data. It's just that what they see on screen doesn't correspond to what made it into the file.
2007-04-04 06:22:06 +0100 / enh / revision 1262
src/terminator/TerminatorFrame.java: Scott Wells pointed out that we were getting our window size wrong, and mad narrowed it down to revision 1214, where I handed responsibility for adding the menu bar (or not) over to optionsDidChange. It looks like I was too focused on making sure that it happened before the setVisible that I ignored the pack: I can't think of any reason why adding the menu bar after the pack wouldn't be a mistake.
2007-04-03 03:10:29 +0100 / enh / revision 1261
src/terminator/TerminatorMenuBar.java: Chris Reece complains "Interestingly, with no windows open, Shift-Cmd-T, Tab, Return does exactly what you'd expect, except that it passes the return though to the resulting command. Same key sequence with one or more tabs open, new tab doesn't get a stray newline." Sounds like a problem we had with some of the dialogs in Evergreen.
2007-04-02 23:15:15 +0100 / mad / revision 1260
www/index.html: I was surprised not to find anything when searching for "faq" in my browser.
2007-04-02 02:24:38 +0100 / enh / revision 1259
src/terminator/model/StyledText.java: we were previously quite sloppy about the foreground and background values for styles that didn't have a specific foreground or background. The value would depend on how we'd arrived at the present style, meaning the "short" representation of a style wasn't suitable for comparison. That didn't matter before (as far as I can think), but it matters now...
src/terminator/model/TextLine.java: rewrite the style-handling side of this class to lazily create the short[] of style data the first time non-default styling is needed for that line. The reasoning being that most lines only ever use the default style, and many of those lines that do use non-default styles are short-lived (because they're on the alternate buffer because you're running something like Vim). Before, the cost per character was two bytes for the character data plus two bytes for the style data for each character (plus some per-line overhead). Now, the cost per character is two bytes for the character itself, and you only pay for the extra two bytes of style data if needed. There's some unnecessary copying in the new code, both for simplicity's sake (copying with the case where there's no style data has added some complexity) but also because with the likely size of a styled line (<= 80 characters) it's not obvious that avoiding copying a few bytes saves more than the extra code and method calls cost; we should measure, I think, before we rush to put the cleverness back.
2007-04-01 00:46:37 +0100 / enh / revision 1258
src/terminator/model/TextLine.java: two uses of styles.length are more logically text.length(), while a third is actually latent "style data" method.
2007-03-31 23:33:16 +0100 / enh / revision 1257
src/terminator/model/TextLine.java: "extendWith" actually implements "overwrite".
2007-03-31 23:20:20 +0100 / enh / revision 1256
src/terminator/model/TextLine.java: that the "shorts" methods deal with a short[] is a mere implementation detail, and one that's likely to change soon. "Style data" is more intention-revealing.
2007-03-31 23:18:13 +0100 / enh / revision 1255
src/terminator/model/TextLine.java: the "shorts" methods all always operate on the same first parameter, the "styles" field, so there's no point always passing it in.
2007-03-31 23:13:50 +0100 / enh / revision 1254
src/terminator/model/TextLine.java: the other methods' names may be bad jokes, but at least they're accurate and descriptive. The "trim" method does no such thing.
2007-03-31 22:59:38 +0100 / enh / revision 1253
src/terminator/Options.java: remove the user-settable colorBD and replace it with code that automatically chooses a suitable color. If the normal-intensity foreground color is a well-known color, use its high-intensity equivalent. Otherwise, more each color component to full-black or full-white if it's "close enough". Also ensure that colorBD is automatically updated whenever the default foreground color is changed. Improve makePresetButtonImage so that it reflects the user's anti-aliasing setting (though the button won't update while the preferences dialog is up).
2007-03-31 19:25:59 +0100 / enh / revision 1252
src/terminator/Options.java:
src/terminator/view/JTerminalPane.java: remove the option to start a login shell, and always pass "-l" to the shell. I had to help someone who found that Microsoft's telnet(1) was now above Cygwin's telnet(1) on their PATH. It turned out that they'd turned off this option in the preferences dialog. One thing that strikes me is that the name, though strictly accurate, was likely meaningless to a lot of people. (You might hope that people wouldn't mess with something they don't understand, but that's not the way the world works.) Apple's Terminal.app doesn't offer the option either, and we (unlike them) don't let you choose an alternative to $SHELL to run as the default command.
2007-03-31 18:05:55 +0100 / enh / revision 1251
src/terminator/Options.java: use the current (XTerm 225) "standard" colors. From the XTerm source:
! Disclaimer: there are no standard colors used in terminal emulation.
!
! The choice for color4 and color12 is a tradeoff between contrast, depending
! on whether they are used for text or backgrounds. Note that either color4 or
! color12 would be used for text, while only color4 would be used for a
! background. These are treated specially, since the luminosity of blue is
! only about half that of red/green, and is typically not accounted for in the
! RGB scheme.
!
! Blue text on a black background should be readable.
! Blue backgrounds should not be "too" bright.
!
! Originally color4/color12 were set to the names blue3/blue
!*VT100*color4: blue3
!*VT100*color12: blue
!
! They are from rgb.txt respectively:
! 0 0 205 blue3
! 0 0 255 blue
! However, blue3 is not readable on a black background.
!
! Another choice was from the Debian settings:
!*VT100*color4: DodgerBlue1
!*VT100*color12: SteelBlue1
!
! From rgb.txt:
! 30 144 255 DodgerBlue1
! 99 184 255 SteelBlue1
!
! Some users object to this choice because the background (color4) is brighter
! than they are accustomed. Others point out that the different weights for
! the red/green components make it appear to be not really blue. Finally, it
! provides poor contrast against color13 and color14.
!
! The current choice uses equal weights for red/green (effectively adding a
! gray to the result). It is brighter than the original choice, and provides
! more contrast between color12 and color13, color14 than SteelBlue1 did.
! Contrast of color4 against black is slightly improved over the original.
!
! Some refinement is certainly possible (you are welcome to try) -TD
FatBits confirms that Apple's xterm(1) is using the "Debian" colors. Ubuntu uses the Dickey colors.
2007-03-31 17:48:42 +0100 / enh / revision 1250
src/terminator/Options.java: Terminator's interpretation of bold colors was that (with the exception of foreground/colorBD) they have the same pixel values as the normal colors. Terminal.app mostly agrees, which is probably how Terminator ended up incorrect, but if you use FatBits to look at the output of "colortable16.sh" from http://frexx.de/xterm-256-notes/ you'll see Terminal.app treats some colors slightly differently when they're used as background colors, whereas in Terminator all x-on-x combinations are invisible. (Terminal's behavior is arguably useless because the difference in most cases is too subtle to notice unless you know there's something there, and too subtle to read unless you know what it should say.) XTerm, by contrast, has very few truly invisible combinations (just the normal x-on-xs) and only green/cyan combinations (sometimes normal, sometimes bold) are excessively difficult to read. Interestingly, Apple's xterm(1) looks different to the screenshot on the web page mentioned above; the dark blues in particular are much less dark. Anyway, Terminator already had the correct code, it just didn't have color defaults available. Rectifying that fixes our "colortable16.sh" output to be in line with the web page, but not with Apple's xterm(1). More to come...
2007-03-28 04:48:36 +0100 / enh / revision 1249
www/faq.html: make the subsection titles more specific.
2007-03-28 04:47:00 +0100 / enh / revision 1248
www/faq.html: fix the heading sizes.
2007-03-28 04:45:29 +0100 / enh / revision 1247
www/faq.html: explain the basics of setting the tab/window title.
2007-03-28 04:24:46 +0100 / enh / revision 1246
www/index.html: rip the ad-hoc "FAQ" section of the page out...
www/faq.html: into an explicit FAQ page.
2007-03-27 09:07:48 +0100 / car / revision 1245
src/terminator/CommandDialog.java: Make sure that the now correctly selected item in the list is visible when we show the list.
2007-03-27 06:21:51 +0100 / enh / revision 1244
src/terminator/TerminatorMenuBar.java: Chris Reece points out that "New Shell Tab..." and "New Command Tab...", when there's no window to add a tab to, should be interpreted as the equivalent window-opening commands instead. Other tabbed applications work like this, we've no useful competing interpretation of the keystrokes, and – as he explains – we're encouraging users into a habit and then punishing them for it: "It's just that I have this muscle memory that hits Shift-Cmd-T whenever I think "new task", and once in a while I get caught out, typically after I've thought "this super-task is finished" and cycled through all open tabs closing everything (which serves to ensure that all component parts of the task really are finished – amazing how a good tool shapes workflow.)"
2007-03-27 05:26:36 +0100 / enh / revision 1243
src/terminator/CommandDialog.java: implement Chris Reece's suggestion that it should be easier to get the text of old commands into the text field for further refinement. (Copy and paste has always worked, but that isn't necessarily obvious, feels awkward to someone who wants to use the mouse, and doesn't prevent us from offering an alternative.) The potential disadvantage of this is that it makes double-clicking slightly harder; you've less room for error because the first click will change the text field which will change the list which can mean a slow second click doesn't land where you intended. We'll have to see how this works out.
2007-03-27 05:04:14 +0100 / enh / revision 1242
src/terminator/CommandDialog.java: implement a plausible improvement described and justified by Chris Reece.
2007-03-26 16:34:40 +0100 / enh / revision 1241
src/terminator/CommandDialog.java: we've tried alphabetically sorting the history for long enough; time to try chronological sorting.
2007-03-26 07:07:14 +0100 / enh / revision 1240
TODO: consolidate two existing comments and add a new one.
2007-03-26 07:05:49 +0100 / enh / revision 1239
src/terminator/view/highlight/SelectionHighlighter.java: use LazyStringSelection to bring the cost of maintaining the X11 selection (as opposed to clipboard) down. If Bjarne taught us one thing, it's that you shouldn't have to pay for what you don't use.
2007-03-22 05:54:33 +0000 / enh / revision 1238
native/all/pty/terminator_terminal_PtyProcess.cpp: this wasn't the bug I was looking for, and as far as I know this has never caused us any trouble, but every time I look at this code I'm uncomfortable because we don't cope with partial writes (though we already coped with deferred writes).
2007-03-21 02:59:07 +0000 / enh / revision 1237
src/terminator/view/highlight/FindHighlighter.java:
src/terminator/view/JTextBuffer.java: use the "isAdjusting" idiom to improve performance when searching for "e" in the output of "man bash" from excruciatingly embarrassing to expeditiously efficient.
2007-03-20 05:51:42 +0000 / enh / revision 1236
src/terminator/TerminatorMenuBar.java: use GnomeStockIcon.configureAction.
2007-03-19 04:38:40 +0000 / enh / revision 1235
src/terminator/Options.java: very few applications let you discard your modifications in their preferences dialogs, but it's easy, potentially useful, and unlikely to make the dialog more confusing, even if the user does now have to choose between two buttons (and the behavior of closing the dialog with the Escape key or the window frame close icon has now changed).
2007-03-19 04:06:42 +0000 / enh / revision 1234
src/terminator/Options.java:
src/terminator/Terminator.java: "showOptions" was a misleading name.
2007-03-19 04:04:17 +0000 / enh / revision 1233
src/terminator/view/JTerminalPane.java: improve our appearance on Mac OS a little. There must be a way to coax JScrollBar into doing this for us, but I couldn't find it. (I also couldn't use GradientPaints because these aren't linear gradients. I could have implemented my own Paint, but I believe that would mean even more code.)
2007-03-18 18:01:58 +0000 / enh / revision 1232
native/all/pty/terminator_terminal_PtyProcess.cpp: it turns out that I wasn't measuring what I thought I was measuring last week; the cost was dominated by the std::vector construction. The cheapest way (and the least code) to implement nativeRead is actually to GetByteArrayRegion into a buffer on the stack. Similar would be true for nativeWrite, but we don't have control over the size of writes, and writing isn't relevant to performance anyway, so there let's just use the method that requires the least code. Also fix the build by modifying sendResizeNotification in line with my recent JniField changes.
2007-03-12 02:31:23 +0000 / enh / revision 1231
src/terminator/Options.java: offer a small selection of preset color combinations. Modify ColorPreference so that we can update the colors while the dialog is up. Fix the orthography of readRgbFile, and fix the option reading code to understand the comment character we actually use these days (commented lines were ignored later, so the bug didn't harm correctness).
TODO: job done. I used to think that we should explicitly name the other terminal emulators, but experience suggests that it would only encourage unwarranted expectations that we're an XTerm emulator rather than a terminal emulator in our own right. Showing on the button the result they'll have works better for hypothetical users who don't know other terminal emulators, and avoids the problem of users who associate a particular terminal emulator with their own settings (I'm often surprised that Terminal.app looks more like XTerm than Terminator by default).
2007-03-11 06:47:23 +0000 / enh / revision 1230
TODO: a few extra notes on things I've investigated but not "done".
2007-03-11 06:27:01 +0000 / enh / revision 1229
src/terminator/FindDialog.java:
src/terminator/view/highlight/FindHighlighter.java: fix the annoying flash (and waste of CPU time) when you accept the find dialog after the find has already been done.
2007-03-11 06:12:10 +0000 / enh / revision 1228
src/terminator/view/JTextBuffer.java: add a StopWatch for paintStyledText, and move the background-filling into a conditional; we've already filled the background in paintComponent, and it only makes sense to fill it again if the text's style has a different background color.
2007-03-11 02:08:01 +0000 / enh / revision 1227
src/terminator/LogWriter.java: remove accidentally committed debugging output.
2007-03-11 01:37:12 +0000 / enh / revision 1226
src/terminator/terminal/TerminalControl.java: rather than send each individual character to the LogWriter as we process it, send the whole array each time a read from a child completes. This means the log may run slightly ahead of the display (which doesn't matter) and greatly cuts down on the amount of work we do per logged character. We also check for newlines here and pass the information on to the LogWriter, since we have to iterate over every character anyway and can remove the need for a second iteration. Measurement suggests it isn't worth splitting the iteration in two, breaking after the first newline and then no longer checking for newlines; there's no measurable improvement at the expense of considerable obfuscation.
src/terminator/LogWriter.java: make the "suspended?" conditional a problem for a JVM PIC by introducing a NullWriter. Don't flush on every newline; restart a timer and wait until we get a quiet moment (or flush automatically because we fill the buffer). These changes bring the cost of logging right down to the point where even commenting it out doesn't survive a blind taste test (with my current "big cat" benchmark). Different buffer sizes might help on some platforms, but they're mildly harmful on Linux 2.6 to local disk. Removing the synchronization and unnecessary error checking from BufferedWriter reduces the impact of logging when you first start Terminator, but HotSpot does an equally good job after a few runs of my benchmark anyway.
2007-03-11 00:27:40 +0000 / enh / revision 1225
native/all/pty/terminator_terminal_PtyProcess.cpp: pass decisions about copying over the JVM in the (realistic) hope that most of the time it'll give us direct access to the byte[] we're after. The non-performance case (writing user input) has a worst case the same as the old code's usual case, and a best case that saves a copy. The performance case (reading process output) has a worst case that costs an extra useless copy in addition to the copy corresponding to that in the old code, but the normal case should cost us one less copy. (My benchmark has been cat(1) of a 4.3 MiB stored "ls -lR" with 75000 lines on a machine where the graphics hardware is not the bottleneck. This code take about 1/6th less time than the old code.)
2007-03-11 00:02:03 +0000 / enh / revision 1224
src/terminator/terminal/PtyProcess.java: although PtyOutputStream.write(int) is, to the best of my knowledge, correct, we don't use it and we don't want anyone using it, so let's throw UnsupportedOperationException there too.
2007-03-10 07:16:36 +0000 / enh / revision 1223
src/terminator/terminal/PtyProcess.java: rather than have an incorrect implementation of a method we (thankfully) don't call, just throw UnsupportedOperationException. (The error is in the assumption that the two read methods return the same kind of thing. They don't.)
2007-03-08 06:52:22 +0000 / enh / revision 1222
src/terminator/view/JTextBuffer.java: improve the name further; I think "for" makes it clearer that we really are modifying this line's highlights, rather than a copy of them.
2007-03-08 06:50:31 +0000 / enh / revision 1221
src/terminator/view/JTextBuffer.java: favor contains over indexOf, and improve a name.
2007-03-07 17:25:12 +0000 / mad / revision 1220
src/terminator/view/JTerminalPane.java: Make it less likely that any reader will assume we're out-of-date, instead of finding that they're actually using an out-of-date terminfo or an out-of-date xterm. Elliott's post-check-in clarification was:
> amusingly, though Terminal.app actually uses the modern XTerm
> sequences, its terminfo specifies the old ones. that is, Mac OS has
> outdated XTerm infocmp. which i guess is more proof that
> applications do as XTerm does rather than as infocmp would tell them.
actually, it's stranger than that. on my Ubuntu box, xterm-color has
the "old" values for F1-F4 while "xterm" has the new ones. but both
have out-of-date values for the cursor keys. so although infocmp(1)
says we differ from XTerm, we don't. that's a big extra gotcha for
trying to match XTerm; i'd assumed that we just had to work until the
output of "infocmp -1 xterm terminator" was as close to empty as
possible, but i don't think that would be wise.
"ctlseqs", on the other hand, does seem to be kept up to date. i
haven't found a discrepancy there yet. but it's probably going to be
wise to always actually test XTerm.
i also notice that although Ubuntu 6.10 is on XTerm(216), dickey's up
to XTerm(224) 2007-02-11, so it's still a moving target.
2007-03-07 02:46:54 +0000 / enh / revision 1219
src/terminator/view/JTerminalPane.java: Chris Reece points out that we send unusual escape sequences for F1-F4, thanks to our rxvt(1) heritage. So switch to the usual XTerm sequences...
lib/terminfo/terminator.tic: ...and declare our new allegiance.
2007-03-06 21:20:46 +0000 / mad / revision 1218
src/terminator/terminal/escape/CSIEscapeAction.java: The xwsh man page suggested that 21 should be the opposite of 1, which has logic in the context of 24 being the opposite of 4. xterm doesn't do that but it looks like a mistake in our source unless we demonstrate that it's deliberate.
2007-03-06 07:01:21 +0000 / enh / revision 1217
src/terminator/view/JTextBuffer.java: use BorderFactory where possible.
2007-03-05 01:22:58 +0000 / enh / revision 1216
src/terminator/view/JTextBuffer.java: Graphics is a thing of the past.
2007-03-05 00:30:52 +0000 / enh / revision 1215
src/terminator/TerminatorFrame.java: factor out the background color updating code, and explain why it exists.
2007-03-05 00:07:56 +0000 / enh / revision 1214
src/terminator/TerminatorFrame.java: don't duplicate the code to add the menu bar, and don't ever needlessly re-add the menu bar if it's already present. Clarify the commenting, too. Also fix the real cause of Aryeh Leib Taurog's bug reports about the background color appearing to bleed into the tabbed pane when seemingly unrelated options were changed in the preferences dialog.
2007-03-02 23:51:13 +0000 / mad / revision 1213
www/index.html: Peter Three-Sixty from fastmail dot us is dead right that the termcap information was in the wrong place in this file. That's what comes of looking at the markup more than the browser. Elliott wants to turn this into a FAQ, which would be better still, but this is easily fixed.
TODO: Record why less(1) still uses termcap on Cygwin - that's more motivation to sort out the terminal capabilities to be more like xterm (or xterm-color or whatever).
2007-03-02 23:13:12 +0000 / mad / revision 1212
native/all/pty/PtyGenerator.h: I'm not sure what approach we have to Cygwin compatibility. This isn't the only bit of code we could get rid of if we only "supported" recent versions. See synchronizeWindowsEnvironment.cpp for the other bit that springs to mind.
2007-02-24 21:02:44 +0000 / enh / revision 1211
src/terminator/view/highlight/SelectionHighlighter.java: fix build by correcting a copy & paste error, in favor of the pasted-in code rather than the existing code.
2007-02-24 05:09:01 +0000 / enh / revision 1210
src/terminator/view/highlight/SelectionHighlighter.java: we never see already-consumed events in real life, but PTextArea's equivalent code (which does ignore them) is now more correct than this, so this should be brought in line.
2007-02-22 07:19:47 +0000 / mad / revision 1209
bin/terminator: Even Terminator was referring to "edit".
2007-02-22 05:52:57 +0000 / enh / revision 1208
src/terminator/TerminatorMenuBar.java: HelpMenu now gets the application name from Log.
2007-02-22 04:50:22 +0000 / enh / revision 1207
src/terminator/view/JTextBuffer.java: update some code to take advantage of Java 5.
2007-02-21 06:23:21 +0000 / enh / revision 1206
src/terminator/CommandDialog.java: make the delete key in the history list remove the selected items from the history.
2007-02-20 16:26:28 +0000 / mad / revision 1205
src/terminator/CommandDialog.java: Fix Java 5 build.
2007-02-20 04:34:51 +0000 / enh / revision 1204
src/terminator/view/highlight/SelectionHighlighter.java: don't squirrel away the current foreground and selection background preferences in SelectionStyle; check the current preferences each time we need the colors, so we track color changes for free. I think this is the last of the preferences that existing windows could sensibly track but don't.
2007-02-20 04:22:37 +0000 / enh / revision 1203
bin/terminator: pass the dot directory through to the Java side.
src/terminator/CommandDialog.java: so we can store a history of run commands, and offer old commands in a filtered-as-you-type list.
2007-02-19 23:01:16 +0000 / enh / revision 1202
src/terminator/CommandDialog.java:
src/terminator/TerminatorMenuBar.java: pull the dialog that asks for a command to run out into its own class.
2007-02-19 20:25:49 +0000 / enh / revision 1201
src/terminator/Terminator.java: remove useless code.
2007-02-19 20:02:11 +0000 / enh / revision 1200
src/terminator/TerminatorMenuBar.java: remove the hard-coded "Debug" menu now it's automatically available from the "Help" menu.
2007-02-19 06:37:31 +0000 / enh / revision 1199
src/terminator/view/JTextBuffer.java: we can get 80% of the value of dynamically following font changes for very little effort. This doesn't attempt to resize the windows, but the scroll bars take into account the fact that more or less content is now visible.
2007-02-19 03:19:32 +0000 / enh / revision 1198
src/terminator/Options.java: ensure there's only one preferences dialog open at once.
2007-02-19 03:10:53 +0000 / enh / revision 1197
src/terminator/Frames.java: avoid the possibility of creating multiple "hidden frames" on Mac OS.
2007-02-18 20:09:47 +0000 / enh / revision 1196
src/terminator/Options.java: center the preferences dialog on the given parent.
src/terminator/Terminator.java: so Mac OS can continue to center on the display...
src/terminator/TerminatorMenuBar.java: ...but other systems can center on the terminal in question.
2007-02-18 06:51:03 +0000 / enh / revision 1195
src/terminator/Options.java: make use of the new multiple-tab form support to move the color preferences onto their own tab.
src/terminator/FindDialog.java: track API change.
2007-02-18 01:17:15 +0000 / enh / revision 1194
TODO: add an old suggestion that's been lurking in my inbox, and replace an idea I had that I've long since thought would be a move in the wrong direction.
2007-02-17 19:49:59 +0000 / enh / revision 1193
src/terminator/Options.java:
src/terminator/view/JTerminalPane.java: remove the old border-width property, which was a distraction that users shouldn't have to bother with, and which never worked very well when changed at run-time anyway (pointed out recently by Aryeh Leib Taurog, who noted that we were upsetting JTabbedPane into appearing to change its background color).
src/terminator/view/JTextBuffer.java: add proper Swing border/insets support to our special text component, and set a border with a short top, to better visually weight the content than we did before. (Funnily enough, using Swing borders/insets is probably enough to fix the actual reported bug, but I've always felt bad about offering such a trivial configuration parameter. It seemed like a good idea when we were trying to take the user's existing settings from their X11 resources, but should have been removed when we switched to our own preferences.)
2007-02-16 06:03:43 +0000 / enh / revision 1192
src/terminator/view/JTerminalPane.java: a slight variation on martind's suggested patch for Firefox/GNOME Terminal control-page up/down tab cycling.
2007-02-16 05:17:09 +0000 / car / revision 1191
lib/terminator-128.png:
lib/Terminator.icns:
lib/terminator.ico: Prettier icons.
lib/terminator-512.png: And a big one, just for Elliott.
2007-02-16 00:26:02 +0000 / mad / revision 1190
src/terminator/TerminatorMenuBar.java: Aryeh Leib Taurog correctly points out that Firefox, like gnome-terminal, also supports control-page up/page down for tab cycling. Add that result to the survey, necessitating the clarification of a later comment.
2007-02-13 17:09:18 +0000 / enh / revision 1189
www/index.html: explicitly mention Konsole for the benefit of Google. Konsole has the questionable distinction of being the only Unix terminal emulator I know of that I absolutely couldn't live with under any circumstances, so it's possible that other Konsole-haters might be looking for Terminator but not know it.
2007-02-08 07:21:11 +0000 / enh / revision 1188
src/terminator/Terminator.java:
src/terminator/TerminatorMenuBar.java: track API changes (based on a suggestion regarding Terminator made by Tony May).
2007-02-03 09:03:16 +0000 / mad / revision 1187
bin/terminator: Some debugging code reveals why the test was backwards. Gruesome. What if you deliberately downgraded? Maybe we should just copy it always or, if we really care about minimizing spurious copies (why?), copy if it's different.
2007-02-03 06:52:13 +0000 / mad / revision 1186
bin/terminator: No, my mistake (through rushing) - the previous code was functionally OK, it just looked wrong. The check-in comment was right to complain about the odd uptodate? method but we weren't helping ourselves by giving the arguments in opposite order to the way the method was intended to be used, as evidenced by the ruby-doc.org example and our own other usages.
The real problem here (for Jay Taylor) is that the .msi file doesn't include the generated terminfo. I probably broke that just the other day, but I need to get to the bottom of it.
2007-02-03 06:44:48 +0000 / enh / revision 1185
src/terminator/Terminator.java: bump copyright date.
2007-02-03 01:39:25 +0000 / mad / revision 1184
bin/terminator: Get the up-to-date test the right way round - this has been broken since 20