2010-03-04 17:47:48 +0000 / mad / revision 1608

www/faq.html: Explicitly suggest vim-enhanced.


2010-02-01 17:55:10 +0000 / enp / revision 1607

src/terminator/TerminatorPreferences.java: Alter the default settings: choose antialiased black-on-white. The main motivation is that Menlo, the new Mac OS default font, looks bad without antialiasing, and antialising looks best if it's dark-on-light.

http://groups.google.com/group/terminator-users/browse_thread/thread/2cc6787cb9a9650?hl=en


2010-01-30 20:17:02 +0000 / enh / revision 1606

src/terminator/view/TerminatorMenuItemProvider.java: I can't reasonably include the full Unicode database so I can tell you that U+0666 is "ARABIC-INDIC DIGIT SIX", but I can tell you you're in the ARABIC block (and already do so), and I can tell you that you're looking at a decimal digit number (category Nd). I was tempted to take up less space by just giving the two-character category names, but I decided that this feature is probably most useful when you're looking at something really strange, and who sees Zp often enough to remember what it is?


2010-01-30 19:50:44 +0000 / enh / revision 1605

src/terminator/view/TerminatorMenuItemProvider.java: support all code points, not just BMP, and support interpretation of "U+00a0" and "\u00a0" representations as if they were the characters they represent.


2010-01-28 22:29:09 +0000 / mad / revision 1604

www/manual.html: Be consistent with the orthography for menu options elsewhere on the page.


2010-01-28 22:28:00 +0000 / mad / revision 1603

www/manual.html: Hopefully this missing markup will fix the indentation.


2010-01-28 22:26:26 +0000 / mad / revision 1602

www/manual.html: That's now more than one user, I think, who's measured their log generation rate and found it unsustainable. Perhaps I shouldn't pessimistically assume that people who want to disable the logging are being premature optimizers.


2010-01-27 16:24:43 +0000 / enp / revision 1601

www/faq.html: Apple introduced a successor for Monaco with Mac OS 10.6, and it's nice enough to mention here.


2010-01-27 06:42:11 +0000 / enh / revision 1600

src/terminator/view/TerminatorMenuItemProvider.java: give detailed information about a single character, if that's what's selected.


2010-01-18 19:01:21 +0000 / enp / revision 1599

src/terminator/Frames.java: Look for the method that takes a PopupMenu as a parameter.


2010-01-18 18:54:13 +0000 / mad / revision 1598

src/terminator/Frames.java: Fix build breakage introduced with r1597 on both non-Mac platforms:

src/terminator/Frames.java:44: cannot find symbol
symbol : method setDockMenu(java.awt.PopupMenu)
location: class com.apple.eawt.Application
            Application.getApplication().setDockMenu(dockMenu);
                                        ^
1 error

We hope this code will never be called except on a Mac, though that isn't quite obvious from the callers, specifically from getFrame, which, as Ed says, is probably a mistake. Even so, we need to deal with two checked exceptions, NoSuchMethodException and IllegalAccessException.

Apparently, there's no new version of AppleJavaExtensions.jar, with this method, available.


2010-01-16 19:32:52 +0000 / enp / revision 1597

src/terminator/Frames.java: Attach a menu to the Terminator icon in Mac OS X's Dock, and put some useful items in it.


2010-01-11 01:39:22 +0000 / enh / revision 1596

src/terminator/view/FindPanel.java: stop reporting out of date match counts.


2010-01-11 00:50:01 +0000 / enh / revision 1595

src/terminator/view/TerminalView.java: ecj's missing @Override check found an error: we were unintentionally overriding Swing's obsolete hasFocus method. There isn't even any reason for us to record whether we currently have the focus or not, because Swing is already doing that for us.


2010-01-11 00:45:08 +0000 / enh / revision 1594

src/terminator/InfoDialog.java:
src/terminator/model/TerminalModel.java:
src/terminator/TerminatorFrame.java:
src/terminator/TerminatorTabbedPane.java:
src/terminator/view/JTerminalPane.java: ecj's missing @Override check found an actual mistake: we were accidentally overriding Swing's getName/setName in JTerminalPane instead of adding our own. It doesn't really matter, but overriding something unused to use it for an unrelated purpose is misleading, so let's not do that.


2010-01-11 00:40:51 +0000 / enh / revision 1593

src/terminator/Frames.java:
src/terminator/InfoDialog.java:
src/terminator/model/StyledText.java:
src/terminator/terminal/PtyProcess.java:
src/terminator/TerminalLogWriter.java:
src/terminator/TerminatorMenuBar.java:
src/terminator/TerminatorPreferences.java:
src/terminator/TerminatorTabbedPane.java:
src/terminator/view/FindPanel.java:
src/terminator/view/highlight/SelectionHighlighter.java:
src/terminator/view/JTerminalPane.java:
src/terminator/view/TerminalView.java:
src/terminator/view/VisualBellViewport.java: fix unused import, unnecessary semicolon, and missing @Override warnings from ecj.


2009-10-29 18:35:35 +0000 / enp / revision 1592

www/faq.html: Fix broken tag that leaves all subsequent text monospaced.


2009-10-24 21:20:03 +0100 / enh / revision 1591

src/terminator/model/Style.java: explain a hack I've just understood.


2009-10-24 21:03:04 +0100 / enh / revision 1590

src/terminator/model/Style.java: implement a better Style.hashCode using Bloch's recommended form.


2009-10-24 20:52:06 +0100 / enh / revision 1589

src/terminator/model/Location.java: change Location.hashCode to use Bloch's recommended form.


2009-10-24 20:29:05 +0100 / enh / revision 1588

src/terminator/model/Location.java:
src/terminator/model/Style.java:
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:
src/terminator/terminal/PtyProcess.java:
src/terminator/terminal/TerminalControl.java:
src/terminator/view/highlight/Highlight.java: be more consistent in our use of @Override, and improve Location.equals to use the recommended idiom.


2009-10-24 19:16:08 +0100 / mad / revision 1587

src/terminator/view/highlight/FindHighlighter.java: There's only one call to new Style outside Style, so it's to take one step towards having Style manage its own instances...

src/terminator/model/Style.java: ... at the zero expense of moving the autoboxing (if that's the right word for the conversion from "boolean isBold" to "Boolean isBold") from the Style constructor to the makeStyle class method. I was hoping that this would let me make the Style constructor private, as Elliott had desired in the discussions about the 256 color patch. The compiler then pointed out two places where we "extends Style" and override its methods for getting eg the colors. Well, that presumably makes a partial nonsense of my previous check-in. Given that we want dynamically varying Styles, do we not want Style to become an interface? I'm imagining a FixedStyle which implements that interface in terms of two Color fields and three booleans. I settled for "protected" in the meantime, partly to hint to any similarly naive future maintainer that there are subclasses.


2009-10-24 19:00:24 +0100 / mad / revision 1586

src/terminator/model/Style.java: Define the equals method that we now diligently call, such that our careful code in TextLine to optimize for the default style is activated when we return to the default style by means other than the Reset menu item.

A working equals made it easier to reproduce the null pointer exception in TextLine that was fixed last week. Even once we stop hanging on to equal Style instances, we'll need this to to determine that a requested instance is already in the weak hash set. At the point where we implement hashing, we'll want to revisit the deliberately lame hash function here. A toString was useful to me in discovering this omission...

src/terminator/model/StyledText.java: ... and the getDescription that I cribbed it from isn't called anywhere. Anyone wanting it in future can now call getStyle().toString() (or do something more complete).

Despite leaving the email list with the impression that I've been running with this all week, I've actually just knocked it up, with one eye on Elliott's summary of Bloch's guidelines. So it's not only My First Equals but not tested with much more than the compiler.

I can't help thinking that we might be better off splitting Style into StyleChange and CompleteStyle. The former would get the Boolean fields and wouldn't require equals. The latter would have boolean fields. It would still need equals but at least the implementation wouldn't be quite so cumbersome. You'd apply a StyleChange to a CompleteStyle to get another CompleteStyle.


2009-10-18 21:18:05 +0100 / mad / revision 1585

src/terminator/model/TextLine.java: styles == null is equivalent to an array full of the default style. maybeResizeStyleData can utilize that to avoid relying on its callers to restore the invariant that there should be no nulls, which they'll be tempted to do in an optimal way, leading to overcomplicated code with bugs. The desire here is just to make the code easier to understand, so bugs like that fixed in the previous commit are less likely to happen and easier to spot. There should be no functional change.


2009-10-18 20:58:35 +0100 / mad / revision 1584

src/terminator/model/TextLine.java: A minimal fix for the NPE in getStyledTextSegments discussed in
http://groups.google.com/group/terminator-users/browse_thread/thread/e2c4b2a69eb6d467#.

We weren't initializing the styles from offset + count to styles.length. Examination of the history shows that this method was originally only used when the overwrite was at the end of the existing line (making the uninitialized region empty).

This problem is reproducible, in a new window, by displaying some text, moving left, then overwriting some, but not all, of it:

echo $'hello\E[4D\E[35mwor'

That isn't reproducible in a window which has undergone any Style changes, even if you prefix the command with "reset; ". This will prevent anyone with eg a colored prompt from reproducing the problem.

The reason for this is that, despite now carefully calling equals() instead of == on Style, we're using the default definition for equals(), which, as I understand it, basically is ==. This means that we can never return to a Style that equals the default style. This in turn means that all of the code in this class that attempts to optimize the case of default-styled lines ceases to have any effect once the current Style is changed, which will surely happen in many, many terminal windows. We're littering memory with equivalent Styles that our code doesn't realize are equivalent.

Defining Style.equals() would at least reactivate the optimizations here. Elliott instead suggests doing something to avoid holding on to multiple equivalent Style instances in the first place in:

http://groups.google.com/group/terminator-users/browse_thread/thread/cda99774ddc19b07?pli=1

How would we do that? The first method that occurs to me is to cache the Style instances that we've used in a container, then have makeStyle look them up. HashSet springs to mind as a container. That would, I think, require that we implement equals and hashCode. So perhaps I should check-in my equals, though I don't have a hashCode and I'm wondering why we don't have more definitions of equals and whether there's some trick for defining tuple equality.

But, before that, Elliott had was some belt-and-braces ideas that I should consider here.


2009-10-16 23:08:11 +0100 / mad / revision 1583

bin/terminator: Ron had a window from his i386 installation still open on another virtual desktop. The flaw in the test that I'm leaving a code-comment against means that his correctly installed amd64 version wasn't trying to start Java with the right org.jessies.libraryDirectories.


2009-10-06 02:43:31 +0100 / mad / revision 1582

www/faq.html: Following these instructions to try to recreate Costantino's problem with the Open Terminator Here equivalent in Nautilus (and failing to have any problem), I spannered about looking for the Open Terminal item for too long before trying killall. I'm using Gnome 2.22, so Terminator was already in the list of terminal emulators, although I did note that it didn't look quite like the other entries in the list. Perhaps Costantino's using an older version.


2009-10-05 02:53:43 +0100 / enh / revision 1581

src/terminator/model/Style.java: more comments about the current Style implementation.


2009-10-04 18:40:08 +0100 / enh / revision 1580

www/index.html: what development?


2009-10-04 18:37:32 +0100 / enh / revision 1579

lib/terminfo/terminator.tic:
src/terminator/model/Style.java:
src/terminator/model/StyledText.java:
src/terminator/model/TerminalModel.java:
src/terminator/model/TextLine.java:
src/terminator/Palettes.java:
src/terminator/terminal/escape/CSIEscapeAction.java:
src/terminator/terminal/TerminalControl.java:
src/terminator/view/highlight/Highlight.java:
www/index.html: Ben Longbons' patch for 256-color mode and konsole-compatible 24-bit color (http://groups.google.com/group/terminator-users/browse_thread/thread/cda99774ddc19b07).


2009-10-04 18:28:12 +0100 / enh / revision 1578

www/index.html: add a long-overdue credit.


2009-08-28 05:11:33 +0100 / enh / revision 1577

src/terminator/view/JTerminalPane.java: Neil Berrington reports that control-tab now inserts tabs. The KeyEvent delivered to keyTyped doesn't let us distinguish between control-tab and control-i, so if we want them to behave differently (as we do), we need to handle tab in keyPressed, where we have a more informative KeyEvent. This probably breaks entering tabs with alt and the numeric keypad on Windows, but that's the least of three evils.


2009-08-27 18:07:02 +0100 / mad / revision 1576

www/faq.html: Elliott explains that he used minicom initially and suggests mentioning serial concentrators, which I can usefully speak to.


2009-08-27 16:53:46 +0100 / enh / revision 1575

src/terminator/view/JTerminalPane.java: Josh Bloch reports that you can't use control-i to enter a tab when using Terminator. mad points to r1067, where I appear to have applied an incorrect premature optimization by reusing the key char (which I already had) rather than the key code (which would let me recognize control-tab without being confused by control-i). The other place where I introduced a check for control-tab in the same revision correctly uses the key code already.


2009-08-27 16:45:41 +0100 / enh / revision 1574

TODO:
www/faq.html: since it doesn't look like anyone's planning on doing anything in this area, and because serial port access is a fairly frequently asked question, move the stuff about serial ports into the FAQ (after some tidying).


2009-08-26 22:55:58 +0100 / mad / revision 1573

TODO: Add a note to try (spit) screen(1) for serial access.


2009-08-11 04:00:41 +0100 / enh / revision 1572

src/terminator/TerminatorFrame.java: Chris Reece reports that changing any preference in the preferences dialog when "Always show tabs" isn't set causes the focus to leave the preferences dialog for one of the terminals. The cause is the requestFocus in switchToSinglePane. We can't check whether tabbedPane == null in switchToSinglePane (analogous to the check in switchToTabbedPane) because switchToSinglePane is also called for the initial setup, and then tabbedPane is expected to be null. The best fix would be to have a better tabbed pane and only offer "Always show tabs", removing the need for all this code to switch back and forth, but we don't have a better tabbed pane.


2009-08-11 03:00:41 +0100 / mad / revision 1571

native/all/pty/PtyGenerator.h: Fix a comment that I tried to use today.


2009-08-02 23:34:33 +0100 / mad / revision 1570

src/terminator/model/TerminalModel.java: Leaving highestStartLineIndex at -1 means the condition that checkInvariant has been checking is significantly weaker than the plausible-sounding claim in the message produced, should it ever be violated. The check-in comment suggests, to me at least, that this was unintentional.


2009-08-02 23:15:38 +0100 / mad / revision 1569

bin/terminator: I understand the point that was being made here - that we need a special case and that this is the simplest one which will work, at least until we have a good reason to pass in more of the environment - but I always have to read this comment twice before I get it.


2009-07-15 19:49:39 +0100 / mad / revision 1568

bin/terminator: The recent change to use the same VM for more complex command lines is causing grief for BlueArc users of a program called "runmercury". This kills a program once the terminal returns. While I could hack on that, it would be more generally useful if TerminatorServer invocations behaved more like independent terminals, as suggested by the code-comment I'm replacing here. Contrary to that comment, multiple tabs turn out to make no difference...

src/terminator/TerminatorServer.java: ... and we currently only ever create a single TerminatorFrame per command line. This gives us a window for whose closure we can wait with the new GuiUtilities method. To wait, in a background thread, for the window to be closed we first need to wait for it to be opened. To do this, I wanted to use invokeAndWait in place of Terminator.initUi's invokeLater, but invokeAndWait can't be used from the EDT, which is the thread on which the original command line is parsed. This led me to want an Opener class, like that used by EditServer, which could have two entry points. That led to the gutting of Terminator.parseCommandLine and its callees. The differences between this method and the revamped Terminator.parseOriginalCommandLine, then, are:

* TerminatorServer doesn't want to start TerminatorServer
* TerminatorServer must never call System.exit, whereas that is the only way for the EDT to exit with a syntax error on the original command line
* TerminatorServer needs to wait, where it's pointless (if harmless) for the main() thread to wait
* TerminatorServer shouldn't finishGnomeStartup because DESKTOP_STARTUP_ID is wrong

src/terminator/TerminatorOpener.java: Thus the code moved here from Terminator.java no longer calls System.exit when it trips on a syntax error and no longer calls finishGnomeStartup when showing usage in that situation or on receiving --help. While it's nice that "terminator -e" no longer causes all existing windows to abruptly disappear, it's a bit sad that this, the one piece of syntax that we actually check, wasn't, and still isn't, reflected in the usage. Oh well.

src/terminator/TerminatorFrame.java: finishGnomeStartup is best delegated to a "finally" clause...

src/terminator/Terminator.java: ... in parseOriginalCommandLine, which will catch all three return paths - syntax requested, syntax error and UI started. Another rather incidental fix here is that the "arguments" field, which used to be here, is no longer exposed to potential, if unlikely, contention.


2009-07-12 06:03:54 +0100 / mad / revision 1567

Try harder to use a single VM. We've talked about making this change on a number of occasions. Without it, dragging tabs between windows will be arbitrarily constrained by VM boundaries that are otherwise invisible to the user. Without the ability to drag tabs between windows, it would be less useful to add an option to start new shells in tabs by default, and some users would like that option. Plus dragging tabs between windows would be cool. Making this change will make it more likely that this single VM will run out of heap. I hope that will encourage us to finally do something about that problem.

bin/terminator: Send the whole command line and the directory we were started from. Uri-encode the arguments so that we can use space to separate them without misinterpreting spaces within arguments. Reword a very BlueArc-centric comment.

src/terminator/TerminatorServer.java: Apply the reverse transformation to the argument string goedelized in bin/terminator, then hand it off to parseCommandLine.

src/terminator/Terminator.java: Now that bin/terminator is adding a --working-directory to the start of every command line, cope with the case where the user supplies a later --working-directory that's relative to that one. Perhaps no-one uses --working-directory with a relative path but it was one of the first test cases that sprang to mind.

Remove the code that was allegedly to ignore -xrm argument pairs but which was only ignoring the first argument of the pair. It was getting in the way of passing a List<String> instead of a String[], not irreparably but, if it ain't working, don't maintain it. Handle the abnormal --help case with an early return.


2009-07-01 20:51:35 +0100 / mad / revision 1566

src/terminator/view/JTerminalPane.java: Several commits since r1499 have attempted to work around a mistakenly large deletion made there due to a poor choice of location for the comment:

-
- // Support keyboard equivalents when the user's been stupid enough to turn the menu off.
- if (TerminatorMenuBar.isKeyboardEquivalent(event)) {
- if (!host.isShowingMenu()) {
- actions.handleKeyboardEquivalent(event);
- }
- return;
- }
-

The comment only applied to inner condition. The outer condition, and the crucial return, are still necessary to allow the menu bar to handle keystroke equivalents.

This addresses Christoph Strebin's report that Alt-Up and Alt-Down (or the Ctrl-Shift equivalents) weren't working. While testing, I also noticed that Ctrl-Shift-Page Up/Down were moving tabs, like gnome-terminal, even when advertised on the menu as scrolling. Our own keystrokes should have priority.

I would have been less enduringly confused if doKeyboardScroll and doKeyboardTabAction had names which indicated that they exist only to handle compatibility keystrokes from other applications, not Terminator's own shortcuts to the same functionality. I've sprinkled some comments where confusion is especially likely to arise but I think renaming would still be useful.


2009-06-29 04:27:43 +0100 / enh / revision 1565

src/terminator/InfoDialog.java:
src/terminator/LogWriter.java:
src/terminator/terminal/TerminalControl.java:
src/terminator/TerminalLogWriter.java:
src/terminator/view/JTerminalPane.java: rename LogWriter TerminalLogWriter to make it clearer which kind of log it's responsible for.


2009-06-29 04:23:26 +0100 / enh / revision 1564

src/terminator/InfoDialog.java:
src/terminator/view/JTerminalPane.java: slightly reduce the number of mentions of LogWriter.


2009-06-25 04:23:48 +0100 / enh / revision 1563

www/bug-report.html: fix the domain name.


2009-06-25 04:19:06 +0100 / enh / revision 1562

www/bug-report.html: add a Terminator-specific bug reporting page.


2009-06-24 05:32:16 +0100 / enh / revision 1561

bin/terminator:
www/index.html:
www/manual.html: a start at a Terminator manual.


2009-06-24 05:11:03 +0100 / enh / revision 1560

src/terminator/view/TerminatorMenuItemProvider.java: remove the find and tab-cycling items from the pop-up menu. They date from the days when you could have Terminator windows without menu bars, and all important functionality needed to be on the pop-up menu.


2009-06-23 18:58:29 +0100 / mad / revision 1559

.classpath:
.project: A project description that Matt Hillsdon uses with Eclipse.


2009-06-19 03:38:47 +0100 / enh / revision 1558

src/terminator/TerminatorTabbedPane.java: add close buttons to tabs, based on a patch from Costantino Cerbo. http://groups.google.com/group/terminator-users/browse_thread/thread/264b4c9fe87695e9


2009-06-18 05:58:23 +0100 / enh / revision 1557

src/terminator/TerminatorTabbedPane.java: the activity indicators (and forthcoming close buttons) are too large to fit the small JTabbedPane layout on Mac OS.


2009-06-18 04:55:00 +0100 / enh / revision 1556

src/terminator/view/FindPanel.java: set the client property on the correct component.


2009-06-16 17:43:45 +0100 / mad / revision 1555

src/terminator/TerminatorTabbedPane.java: Prefer early returns for the case where the drag ends either somewhere we don't (yet) support or at the same place it started, to remove a level of indentation, to make the code easier to understand.


2009-06-14 05:32:46 +0100 / enh / revision 1554

src/terminator/view/FindPanel.java: improve our appearance on Mac OS 10.5 and later.


2009-06-14 03:13:42 +0100 / enh / revision 1553

src/terminator/TerminatorTabbedPane.java: remove unnecessary casting, and move similar operations closer together.


2009-06-14 02:49:29 +0100 / enh / revision 1552

src/terminator/TerminatorFrame.java:
src/terminator/TerminatorPreferences.java:
src/terminator/TerminatorTabbedPane.java: add a new preference to always show the tab bar.


2009-06-14 00:48:56 +0100 / enh / revision 1551

src/terminator/TerminatorTabbedPane.java: a patch from Costantino Cerbo to bring up the info dialog when the user double-clicks on a tab.


2009-06-13 04:14:59 +0100 / enh / revision 1550

src/terminator/view/FindPanel.java: actually, there is a good reason to limit the size of the text field even when it's attached to the bottom of an arbitrarily-wide window: it's convenient. It's rare to use a really long regular expression anyway, and choosing a fixed size lets us avoid the complicated (and very much unfinished) attempt to report status in a separate JWindow. This doesn't look quite as "cool", but it doesn't mess up when the window is moved or resized, it doesn't hide text in the text field, and it doesn't require much code.

src/terminator/view/highlight/FindHighlighter.java: "7 matches" looks better than "Matches: 7" in this context. Matt Hillsdon won't care because he doesn't show the status text anyway, but maybe we should report the number and let the FindStatusDisplay decide how to translate it to text?


2009-06-13 03:27:02 +0100 / enh / revision 1549

src/terminator/view/FindPanel.java: Jesse Wilson suggests that clicking back in the terminal should dismiss the find panel (as with the equivalent UI in Evergreen).


2009-06-13 03:24:35 +0100 / enh / revision 1548

src/terminator/view/JTerminalPane.java: revert the hacky part of r403 that's causing trouble with the new find panel. We long since switched to HORIZONTAL_SCROLLBAR_ALWAYS to avoid problems caused by scrollbars appearing and disappearing and the test case mentioned in r403 still works with this change. Bringing up the new find panel now correctly causes a size change as it steals space, and again as it's dismissed and gives the space back.


2009-06-13 03:15:22 +0100 / enh / revision 1547

src/terminator/view/FindPanel.java: I meant to use the tool tip background on Mac OS and Windows, and should have made it clear to anyone changing this for Mac OS or Windows that they don't need to worry about Linux.


2009-06-13 03:06:09 +0100 / enh / revision 1546

src/terminator/view/FindPanel.java: an upper bound on the text field width made sense in a dialog, but doesn't make sense as part of an arbitrarily-wide window.


2009-06-12 06:52:54 +0100 / enh / revision 1545

src/terminator/FindDialog.java:
src/terminator/TerminatorMenuBar.java:
src/terminator/view/FindPanel.java:
src/terminator/view/JTerminalPane.java: seeing Matt Hillsdon's much better find UI for Terminator embedded in Eclipse means that Terminator's find UI has annoyed me much more than usual this week. Tested on Linux and Mac OS 10.5.


2009-06-08 16:40:13 +0100 / enh / revision 1544

src/terminator/view/highlight/FindHighlighter.java: we still need to support Java 5 for Mac OS.


2009-06-08 02:06:07 +0100 / enh / revision 1543

src/terminator/terminal/TerminalControl.java:
src/terminator/TerminatorTabbedPane.java:
src/terminator/view/JTerminalPane.java: another patch from Matt Hillsdon (modulo style changes): http://groups.google.com/group/terminator-users/browse_thread/thread/9fe27d2723914d3f?hl=en


2009-06-08 01:42:23 +0100 / enh / revision 1542

src/terminator/FindDialog.java:
src/terminator/view/highlight/FindHighlighter.java:
src/terminator/view/highlight/FindStatusDisplay.java: another patch from Matt Hillsdon (modulo style changes). http://groups.google.com/group/terminator-users/browse_thread/thread/ecf512fc1117273?hl=en


2009-06-08 00:02:54 +0100 / mad / revision 1541

www/faq.html: A version of less(1) which uses terminfo rather than termcap is now the default with Cygwin 1.7.


2009-06-07 21:34:48 +0100 / enh / revision 1540

src/terminator/FindDialog.java: use ELabel instead of working around JLabel's empty-string behavior.


2009-06-04 01:55:33 +0100 / mad / revision 1539

src/terminator/view/JTerminalPane.java: Rather than doing the wrong thing, refuse to do anything and explain, as best we can, why.

src/terminator/TerminatorMenuBar.java: Any error in newShellHere will now already have been reported nicely. Dereferencing null afterward would detract.


2009-05-31 21:08:10 +0100 / mad / revision 1538

bin/terminator: Suggest that exceptions be emailed to the same address that we use for Report a Problem. Use our exception handler rather than Java.invoke()'s even for errors that occur during Java.launch(), like Jvm startup problems.


2009-05-25 04:16:07 +0100 / enh / revision 1537

src/terminator/CommandDialog.java: add missing "final".


2009-05-24 22:53:03 +0100 / enh / revision 1536

src/terminator/TerminatorPreferences.java: manually split the preferences between three panes. Also add another dark-on-light alternative.


2009-05-24 20:37:31 +0100 / enh / revision 1535

src/terminator/AnsiColor.java:
src/terminator/model/StyledText.java:
src/terminator/Palettes.java:
src/terminator/Terminator.java:
src/terminator/TerminatorPreferences.java: add support for multiple palettes, and add all the palettes currently supported by gnome-terminal. A couple of people have asked for this in the past, and it's likely to be wanted for Terminator embedded in Eclipse; the ANSI yellow in particular assumes a dark background.


2009-05-24 18:53:09 +0100 / enh / revision 1534

src/terminator/view/highlight/FindHighlighter.java:
src/terminator/view/highlight/Highlighter.java:
src/terminator/view/highlight/SelectionHighlighter.java:
src/terminator/view/highlight/UrlHighlighter.java:
src/terminator/view/TerminalView.java: don't pass the highlighted text by default, because it's not usually wanted, is easily gotten hold of, and four arguments to a method is a little on the high side.


2009-05-23 21:43:26 +0100 / mad / revision 1533

native/all/pty/terminator_terminal_PtyProcess.cpp: While the unnecessary requirement for larger contiguous allocations is unlikely to trip us up, though we are the kind of long-lived program for which heap fragmentation could be an issue, deque is preferred over vector in C++. Heap fragmentation and the other functional reasons explained by Sutter in the linked-to article aren't particularly compelling here. Deviating from the convention is more compelling because the convention alerts the reader, when they see a vector, to expect a contiguity requirement.


2009-05-23 21:20:01 +0100 / enh / revision 1532

native/all/pty/terminator_terminal_PtyProcess.cpp: there's no reason to pass ttyFilename by value rather than by const reference.


2009-05-23 21:16:43 +0100 / enh / revision 1531

native/all/pty/terminator_terminal_PtyProcess.cpp: we're not using deque as anything but a vector here, so we may as well use vector.


2009-05-23 21:14:22 +0100 / enh / revision 1530

native/all/pty/terminator_terminal_PtyProcess.cpp:
src/terminator/terminal/PtyProcess.java: replace nativeRead with Posix.read.


2009-05-23 06:46:40 +0100 / enh / revision 1529

native/all/pty/terminator_terminal_PtyProcess.cpp:
src/terminator/terminal/PtyProcess.java: replace the JNI for writing with Java (calling our Posix class).


2009-05-23 05:42:46 +0100 / enh / revision 1528

native/all/pty/PtyGenerator.h: wandering about the JDK a while ago I came across an explanation for part of the voodoo here.


2009-05-23 05:30:46 +0100 / enh / revision 1527

native/all/pty/terminator_terminal_PtyProcess.cpp:
src/terminator/terminal/PtyProcess.java: replace JNI with Java (using our Posix class).


2009-05-21 06:01:53 +0100 / mad / revision 1526

src/terminator/view/highlight/SelectionHighlighter.java: I finally got fed up enough of having my clipboard disappear because of new text appearing that I worked out what causes that. Years, this +-1 bug has been driving me nuts.

Perhaps there's a similar bug in the symmetrical case for lines but I don't understand this whole thing. How come we allow the selection to be set beyond the bounds of the model but then throw it away, in that case, as soon as we're asked to redoHighlightsFrom? I see addHighlights disregards its firstLineIndex parameter, meaning that it adds highlights that weren't removed by its caller.


2009-05-13 18:29:22 +0100 / mad / revision 1525

src/terminator/view/JTerminalPane.java: One other BlueArc user had the same gripe as me. We never want to confirm closing a "runtitan --connect" session. For one thing, closing the connection doesn't ever kill anything that's running on the machine we're connecting to. In an email discussion, we noted that Apple's solution doesn't let you distinguish between a telnet to a serial concentrator and a telnet to a machine which you're running top(1) on. A new command line switch to warrant a terminal as not needing confirmation was discussed. Elliott suggested that none of these were worth the effort and that we should just revert to the old heuristic, so that's what I've done. The mental argument that convinced me to keep the directChildPid check was that, if I started a Gui editor from a shell, then quit the shell, I would want confirmation before I closed the window that was getting stderr from the editor.


2009-05-12 05:53:49 +0100 / enh / revision 1524

src/terminator/view/highlight/UrlHighlighter.java:
src/terminator/view/TerminalView.java: apply a patch from Matt Hillsdon that adds URL highlighting and control-clicking to open the link in a browser.


2009-05-11 22:07:23 +0100 / mad / revision 1523

src/terminator/view/JTerminalPane.java: Even given Java's whack interpretation of String ==, this is a more obvious way of saying the same thing.


2009-05-11 22:04:17 +0100 / mad / revision 1522

src/terminator/view/JTerminalPane.java: If the processList is ["(pty closed)"], then there's nothing to confirm, even if the direct child wasn't a shell.


2009-05-11 01:07:59 +0100 / enh / revision 1521

src/terminator/view/JTerminalPane.java: mad points out that it's trivial to make explicit the implicit assumption I commented yesterday. (Is a commented assumption implicit or explicit?)


2009-05-10 07:57:58 +0100 / enh / revision 1520

src/terminator/view/JTerminalPane.java: expand the comment describing the "can we close this window?" heuristic.


2009-05-10 07:45:15 +0100 / enh / revision 1519

bin/terminator:
src/terminator/terminal/PtyProcess.java: use Signal.toString.


2009-05-10 06:34:55 +0100 / mad / revision 1518

src/terminator/terminal/PtyProcess.java: Expose our fd, now we can have lots of Posix fun with it.

src/terminator/view/JTerminalPane.java: Find the foreground process on that terminal and use the new ProcessUtilities code to find its current directory, so we can create a pane in the same working directory.

src/terminator/TerminatorMenuBar.java: Use that code to implement a couple of new actions, New Shell Here and New Shell Tab Here, sharing some tricksy code with the existing NewTabAction, which is renamed to match its UI.

src/terminator/view/TerminatorMenuItemProvider.java: Delete a fixed FIXME. Expose the new actions in the context menu and...

src/terminator/TerminatorTabbedPane.java: ... adapt to the renaming of NewTabAction.


2009-05-10 06:12:41 +0100 / mad / revision 1517

native/all/pty/terminator_terminal_PtyProcess.cpp: The Mac OS hack here has a nasty consequence, previously undocumented. I'm tempted to save any resize notifications that are delivered before the fd is writable and deliver them as soon as we hear anything from the child. That would be quite intrusive. Perhaps we could get the writerExecutor to waitUntilFdWritable and then send the current size. That thread isn't going to be doing anything useful until the fd is writable. shutdownNow isn't going to stop it from spinning, I imagine. Hmm.


2009-05-10 04:35:43 +0100 / mad / revision 1516

src/terminator/view/JTerminalPane.java: Elliott suggested that we might want to check whether the one thing running is the foreground process on the tty, rather than our direct child. I'm not sure we care at all what the one process is, if there's only one, but clearly there's a deal of carefully crafted code here.


2009-05-10 03:08:25 +0100 / enh / revision 1515

native/all/pty/terminator_terminal_PtyProcess.cpp:
src/terminator/terminal/PtyProcess.java:
src/terminator/view/JTerminalPane.java: we can now implement PtyProcess.destroy without additional JNI. Revert the whimsical use of 'long' instead of 'int' for pid/getPid to avoid introducing casts.


2009-05-08 06:33:18 +0100 / enh / revision 1514

src/terminator/view/highlight/FindHighlighter.java:
src/terminator/view/highlight/Highlighter.java:
src/terminator/view/highlight/SelectionHighlighter.java: apply a patch from Matt Hillsdon to remove the requirement that Highlighter.addHighlights return the number of highlights added, which was only needed in the find highlighter (to count the number of matches) and makes life unnecessarily complicated for other highlighters.


2009-05-04 17:23:31 +0100 / mad / revision 1513

src/terminator/Terminator.java: Scott Wells points out that we can't use Alt-F to open the file menu when we're using Alt as Meta, because you don't want the menu bar to get focus while typing in Emacs, nor do you want the File menu to pop up. This is a disappointing realization but at least we weren't wasting our previous work completely as at least now the mnemonics are disabled uniformly - we no longer have the H of Help underlined - and the Alt-D bug remains fixed.


2009-04-16 05:03:32 +0100 / mad / revision 1512

src/terminator/view/JTerminalPane.java: Chris points out that we have to handle all cursor key shortcuts explicitly, or they'll be used to generate escape sequences. That includes our advertised shortcuts for moving tabs.

Half of the code here was saying ? -1 : +1 and half was saying ? -1 : 1. I don't have any opinion on which is preferable but consistency would be nice. I was tempted to abstract it out but that'd make it less easy to understand a line in isolation.


2009-04-14 20:31:37 +0100 / mad / revision 1511

src/terminator/view/JTerminalPane.java: Since the removal of some code that alleged to be there just for the case when the user has disabled the menu, we've been generating escape sequences for Alt-Left and Alt-Right, even when they're alleged to be the shortcuts for Previous Tab and Next Tab. This is because the code for generating the escape sequences consumes the event before it gets to the menu bar. (The deleted code passed the events to the menu bar before testing to see if we would generate escape sequences.) We want to keep the code for generating the escape sequence for Alt-Left and Alt-Right, so we can generate those sequences when Alt isn't being used for keyboard shortcuts.


2009-04-14 03:32:26 +0100 / enh / revision 1510

src/terminator/Terminator.java: tell GuiUtilities whether or not we want mnemonics (that is, turn them off when we're using alt as the modifier for our accelerators, which conflicts with Linux and Windows' use of alt as the modifier for mnemonics).

src/terminator/TerminatorMenuBar.java: remove a hack that's no longer necessary, having been replaced by a global hack in GuiUtilities.


2009-04-07 02:17:21 +0100 / enh / revision 1509

src/terminator/TerminatorMenuBar.java: GNOME Terminal already uses 'b' as the mnemonic for "Tabs" because it uses 'T' for "Terminal". We may as well do the same.


2009-04-06 15:27:38 +0100 / enh / revision 1508

src/terminator/TerminatorMenuBar.java: Marek Pleskac points out that we broke alt-t for "New Tab" by adding a mnemonic to the "Tabs" menu.


2009-04-04 21:11:55 +0100 / enh / revision 1507

src/terminator/terminal/PtyProcess.java:
src/terminator/view/JTerminalPane.java: we're not aware of any system with 64-bit pid_t (quite the opposite: the 64-bit systems we know of have a 32-bit pid_t, and 64-bit Linux still has a default maximum pid of 32768), but if we're publishing this interface (as we intend to) we probably want the widest signed integral type available.


2009-04-04 20:14:05 +0100 / enh / revision 1506

native/all/pty/terminator_terminal_PtyProcess.cpp:
src/terminator/terminal/PtyProcess.java: the only reason I pulled pid into a local was to make the code look nicer. If it's now making it uglier, it's outlived its usefulness.


2009-04-04 19:47:02 +0100 / mad / revision 1505

native/all/pty/terminator_terminal_PtyProcess.cpp: Use the well-known term "pid" when we mean a process identifier. The compiler I'm using on Windows barfs when a local shadows a field (even when I prefixed the right-hand side of the assignment with "this->", which I did, as you'd hope, realize that I had to do before the first compile). That is, I suppose, a helpful warning. The reason we have a local is presumably to cope with the type of the field necessarily being wrong, because it has to be shared with Java.

src/terminator/terminal/PtyProcess.java: Let's give the compromised variable the compromised name. It doesn't affect code outside this class because we have an accessor method, which wants renaming from "getProcessId"...

src/terminator/terminal/TerminalControl.java:
src/terminator/view/JTerminalPane.java: ... to the name that Matt Hillsdon expected to find - "getPid".


2009-04-04 01:56:43 +0100 / mad / revision 1504

src/terminator/TerminatorMenuBar.java: We can use Alt-F for File if we're using Ctrl-Shift-F for Find.


2009-04-04 01:43:41 +0100 / mad / revision 1503

src/terminator/TerminatorMenuBar.java: Use GuiUtilities to give Edit, Scrollback and Tabs mnemonics, so that the Help menu's underlined H no longer looks like a rendering bug. Leave a comment explaining why F for File isn't underlined, which is also the reason this abstraction wasn't done earlier.


2009-04-04 01:18:22 +0100 / mad / revision 1502

src/terminator/view/JTerminalPane.java: Fix the shortcuts in the menu of extant terminals when you toggle the "use alt key as meta key" option.


2009-04-03 21:07:21 +0100 / enh / revision 1501

src/terminator/view/TerminalPaneHost.java: make explicit the implied "public" on all interface methods.


2009-04-03 21:01:39 +0100 / enh / revision 1500

src/terminator/TerminatorFrame.java:
src/terminator/view/DefaultTerminatorPaneActions.java:
src/terminator/view/TerminatorMenuItemProvider.java: now this is just a MenuItemProvider, its name should reflect that.


2009-04-03 20:55:46 +0100 / enh / revision 1499

src/terminator/TerminatorFrame.java:
src/terminator/view/DefaultTerminatorPaneActions.java:
src/terminator/view/JTerminalPane.java:
src/terminator/view/TerminalPaneActions.java:
src/terminator/view/TerminalPaneHost.java: TerminalPaneActions (and the code that was moved there) isn't actually necessary because...

TODO: ...we removed the "no menu bar" option a long time ago, even if we didn't quite remove all the code.


2009-04-03 20:10:04 +0100 / enh / revision 1498

src/terminator/TerminatorFrame.java:
src/terminator/TerminatorTabbedPane.java:
src/terminator/view/DefaultTerminatorPaneActions.java:
src/terminator/view/JTerminalPane.java:
src/terminator/view/TerminalPaneActions.java:
src/terminator/view/TerminalPaneHost.java: Matt Hillsdon is working on embedding Terminator in Eclipse. This patch removes the assumption that a JTerminalPane is always inside a TerminatorFrame. Mainly, a bunch of code moves from JTerminalPane to DefaultTerminatorPaneActions, Terminator's implementation of the new TerminalPaneActions interface. Within Eclipse, Matt then supplies an alternative implementation.


2009-03-10 19:22:44 +0000 / mad / revision 1497

www/faq.html: Installing the terminfo file apparently does fix the TERMINATOR issue after all.


2009-03-10 16:33:38 +0000 / mad / revision 1496

www/faq.html: I don't think it's worth wasting any more of our or our new friend's time with AIX telnetd. Let's just write it up, in the hope that someone will come along and either find it useful or tell us that it's not the whole story.


2009-03-10 00:25:49 +0000 / mad / revision 1495

www/faq.html: Dave Guyer, a pleasant, clueful chap, tells us that his terminfo woes on AIX were largely due to /usr/share/terminfo not being the right location there. We should qualify our previously authoritative-sounding advice. While I'm there, I may as well record the answer for AIX in the OS-specific part. Who knows, we may see another poor unfortunate.


2009-03-05 05:38:00 +0000 / enh / revision 1494

src/terminator/InfoDialog.java: use DocumentAdapter, stop referencing ETextField.


2009-02-27 22:43:06 +0000 / mad / revision 1493

src/terminator/model/TerminalModel.java: I believe that the two test cases are examples of the only escape sequences which exercise the changed code path. ECMA-48 is uselessly vague. xterm and gnome-terminal both don't wrap at the boundary.

This is another cause of Paul Guo's MDS switch woe. The test case there is:

/bin/echo -e '\n\na11-switch-1(config)# zone name a12-b13-c6 ?\r\n vsan Configure a zone on a VSAN\r\n\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\033[J\ra11-switch-1(config)# zone name a12-b13-c6\n\n'

That should look like this:

a11-switch-1(config)# zone name a12-b13-c6 ?
  vsan  Configure a zone on a VSAN
a11-switch-1(config)# zone name a12-b13-c6


2009-02-21 19:48:21 +0000 / enh / revision 1492

src/terminator/Terminator.java: declare Terminator as GPL 2 or later.


2009-02-21 02:51:51 +0000 / enh / revision 1491

bin/terminator: use the canonical style for all "rescue" clauses.


2009-01-31 01:41:17 +0000 / enh / revision 1490

TODO: record various ideas people have mentioned about adding some degree of log management.


2009-01-31 01:39:50 +0000 / enh / revision 1489

src/terminator/TerminatorPreferences.java: jclerman0 touched the alpha slider and then couldn't set it back to its original value. If you're going to duplicate magic numbers, you need to duplicate them correctly. Better still, don't duplicate them.


2009-01-29 03:52:49 +0000 / enh / revision 1488

src/terminator/InfoDialog.java: lose UneditableField to e.gui.


2009-01-22 05:53:58 +0000 / enh / revision 1487

src/terminator/CommandDialog.java: track API change.


2009-01-22 04:27:52 +0000 / enh / revision 1486

src/terminator/CommandDialog.java: use ComponentUtilities.setJListAction.


2009-01-16 07:18:05 +0000 / enh / revision 1485

src/terminator/CommandDialog.java: remove some duplication using ComponentUtilities.initKeyBinding, and remove irrelevant differences between the JList's MouseListener and the Action it has bound to VK_ENTER.


2009-01-02 03:26:42 +0000 / enh / revision 1484

src/terminator/Terminator.java: 5 years. Half way there.


2008-12-31 23:38:33 +0000 / enh / revision 1483

src/terminator/TerminatorTabbedPane.java: use the new TabbedPane.provideMenuItems API.


2008-12-31 22:05:46 +0000 / enh / revision 1482

src/terminator/TerminatorTabbedPane.java: much of this class is now available in e.gui.TabbedPane, so just subclass that. More of this could be generalized for sharing, but YAGNI.


2008-12-21 01:58:03 +0000 / enh / revision 1481

src/terminator/TerminatorMenuBar.java: mad asks why "Detach Tab" is on the "File" menu rather than the seemingly more obvious "Tabs" menu, and as far as I know, the only answer is that I didn't think to move it when I added the "Tabs" menu earlier this year.


2008-12-19 22:36:47 +0000 / mad / revision 1480

src/terminator/TerminatorServer.java: Looking for a FIXME about an alleged problem with --working-directory, I saw another rusty comment on the same topic as the last.


2008-12-19 22:14:48 +0000 / mad / revision 1479

bin/terminator: Scrape some rust off a comment:

We did eventually make the InAppServer reasonably secure, relying on file security but, being a trusting sort, that's all that protects my .ssh keys. We stopped support -xrm colors some time ago.

I'm leaning towards thinking that we should pass the whole command line, and the current directory, to the InAppServer and let it decide whether it wants us to use a new process. Every time I see a QA Linux box with half a gig of RAM running ten Terminators, each with a gigabyte address space, I cringe, though I have no evidence that they'd handle one fat Terminator any better (and I do have evidence that the unbounded scrollback is what really hurts them).


2008-12-09 05:48:43 +0000 / enh / revision 1478

src/terminator/TerminatorFrame.java: trying to test Lauri's problem, I came across a missing null pointer check. If you had no tabs and pressed alt and a number key, you'd get:

  java.lang.NullPointerException
at terminator.TerminatorFrame.setSelectedTabIndex(TerminatorFrame.java:231)
at terminator.view.JTerminalPane$KeyHandler.doKeyboardTabAction(JTerminalPane.java:601)
at terminator.view.JTerminalPane$KeyHandler.keyPressed(JTerminalPane.java:350)
at java.awt.Component.processKeyEvent(Component.java:6176)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2817)
at java.awt.Component.processEvent(Component.java:5995)
at java.awt.Container.processEvent(Container.java:2046)
at java.awt.Component.dispatchEventImpl(Component.java:4578)
at java.awt.Container.dispatchEventImpl(Container.java:2104)
at java.awt.Component.dispatchEvent(Component.java:4404)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1879)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:752)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1017)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:889)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:717)
at java.awt.Component.dispatchEventImpl(Component.java:4448)
at java.awt.Container.dispatchEventImpl(Container.java:2104)
at java.awt.Window.dispatchEventImpl(Window.java:2559)
at java.awt.Component.dispatchEvent(Component.java:4404)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
at e.debug.EventDispatchThreadHangMonitor.dispatchEvent(EventDispatchThreadHangMonitor.java:191)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:286)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)


2008-12-09 05:42:49 +0000 / enh / revision 1477

src/terminator/TerminatorMenuBar.java: Lauri Hästholm reports that we swallow AltGr on Scandinavian keyboards, and correctly diagnosed where we were doing so. There is an InputEvent.ALT_GRAPH_MASK, but I think we've seen before that on Windows you see ALT_MASK|CTRL_MASK instead. Lauri supplied a patch, but this alternative one (untested for lack of a Scandinavian keyboard) seems less likely to be accidentally regressed by virtue of aggressive verbosity.


2008-11-26 22:06:09 +0000 / mad / revision 1476

native/all/pty/PtyGenerator.h: To my surprise, but as noted earlier, stropts.h isn't some Sun-specific hack. Perhaps there's a little value in noting that.


2008-11-26 22:05:16 +0000 / mad / revision 1475

native/all/pty/PtyGenerator.h: Given the number of occasions on which this code has caused trouble over the years, it's worth a more complete code-comment.


2008-11-26 21:50:43 +0000 / car / revision 1474

native/all/pty/PtyGenerator.h: Both the Sun manual page and the interwebs (http://www.opengroup.org/onlinepubs/000095399/basedefs/stropts.h.html) agree that we should include <stropts.h>, not <sys/stropts.h>. Both exist, the former is slightly more than an include of the latter. Martin told me to do this.


2008-11-26 21:36:00 +0000 / car / revision 1473

native/all/pty/PtyGenerator.h: Changes in Solaris' termios.h (1.41 -> 1.42, 2007-01-14) introduced a definition of TIOCSCTTY, but said ioctl calls yield "inappropriate" errors. This might look a little ugly and obfuscating, please feel free to make a more elegant change. But this at least means that I can compile a working terminator in an up to date Solaris 10 environment.


2008-10-26 18:25:25 +0000 / mad / revision 1472

src/terminator/model/TerminalModel.java: Fix the first test so that it produces the same result whether you start at the bottom of the window or higher up. Make the other tests consistent, so it remains clear that we're just testing eraseInPage(false, true), eraseInPage(true, false) and eraseInPage(true, true).

Elliott writes that the view.repaint() shouldn't be necessary, provided that I'm passing the right argument to linesChangedFrom(). I haven't noticed any difference since deleting it.


2008-10-26 04:47:59 +0000 / mad / revision 1471

src/terminator/model/TerminalModel.java: This produces the same results as Apple Terminal and gnome-terminal for the three test cases. I thought I might be able to delegate to killHorizontally but, when erasing before the cursor, we don't want to move the following text back left. I'm not sure I'm doing the right thing with writeTextAt but it's at least superficially more like the competition. killHorizontally did suggest that we were missing a linesChangedFrom call (whatever that does). I think lineIsDirty is still being given the right argument but I don't know what the view.repaint() is for.

I think this will fix Paul's issue.


2008-10-26 01:18:22 +0100 / mad / revision 1470

src/terminator/terminal/escape/CSIEscapeAction.java: A reading of ECMA-48 confirms my experimental evidence. This function is called "erase in page" by ECMA. I don't think much of the name but it corrects the previous misapprehension.

src/terminator/model/TerminalModel.java: Although I'm deleting carefully commented code, I had previously left fair warning. ECMA says nothing about moving the cursor and my experiments suggest that no-one else does. The code here essentially dates untouched from Phil's package shunting in 2004. I haven't tried to trace the history back further. This doesn't fix the reported issue but checking-in this easy step on its own gives y'all one final chance to stop me before I spend the effort to work out the "difficult" part of the fix.


2008-10-25 22:46:42 +0100 / enh / revision 1469

src/terminator/TerminatorFrame.java: I'd been thinking that we'd need to do something like EMenuBar.traverseMenu to fix up all the keystrokes when the use-alt-as-meta option changes, but I just noticed that I'd already come up with a workaround for the difficulties in replacing the menu bar in an existing window. This patch splits the menu bar code that should only be run once from the code that should be run whenever keystrokes change, and arranges for the latter to be called from optionsDidChange.


2008-10-25 22:30:19 +0100 / enh / revision 1468

src/terminator/TerminatorMenuBar.java: Aaron Harnly points out that in use-alt-as-meta mode, Terminator's menu bar was suggesting keystrokes for navigating to the next/previous tab that just don't work in that mode. Add a special case to suggest ones that will work.


2008-10-19 21:00:08 +0100 / mad / revision 1467

www/index.html: Advertise the feature I implemented at Charles Roper's suggestion, despite it only being offered out of the box on one platform. That platform's file browser perhaps gets more use than those on other platforms. Well, I certainly use it more than Finder and I've scarcely used Nautilus ever. Although part of the reason is doubtless that the other platforms have a proper, performant Unix underneath, it would be unfair not to say that Microsoft actually did a pretty good job with that part of Windows 95 and have commendably resisted the temptation to muck it up in the intervening decade and a half.

I don't think I've ever used this feature in anger but it does still appear to be working today. Thanks for lowering my expectations, Windows installer.


2008-10-15 05:28:46 +0100 / enh / revision 1466

www/index.html: explicitly link to the group.


2008-10-15 05:22:38 +0100 / enh / revision 1465

www/index.html: add back the now-missing navigation bar decoration.


2008-10-11 02:04:23 +0100 / mad / revision 1464

src/terminator/model/TerminalModel.java: Paul Guo reports that backspace and up arrow on his Cisco MDS switch causes the whole line to disappear. His capture shows the switch sending \b\x1b[J.

I've only got as far as writing a test case and showing that our behavior is probably de facto wrong. I haven't looked for the de jure answer. I haven't looked at the history.


2008-09-23 02:59:11 +0100 / enh / revision 1463

src/terminator/Terminator.java:
src/terminator/TerminatorFrame.java:
src/terminator/TerminatorMenuBar.java:
src/terminator/TerminatorTabbedPane.java: mad looked through the history and found that the only stated reason for overriding the system-wide default keystroke modifiers in GuiUtilities was to "fix" the Window menu so that alt-m would minimize a window on Linux. The cost of this has been confusion in PTextAreas, where the usual keystrokes such as control-c don't work and need to be the Terminator alt-c or control-shift-c equivalents. So let's not have a Window menu if we're not on Mac OS, add a Tabs menu on the other platforms so that the semi-useful Terminator-specific items have a home there, and move the modifier-fiddling cruft into TerminatorMenuBar where it belongs.


2008-09-22 16:10:49 +0100 / enh / revision 1462

src/terminator/TerminatorTabbedPane.java:
src/terminator/view/JTerminalPane.java: Csaba Ráduly points out that you can't switch to a numbered tab from the keyboard when in "Use alt key as meta" mode, plus the tool tips are wrong in that case.


2008-09-20 03:41:55 +0100 / enh / revision 1461

bin/terminator:
man/1/terminator.1:
README: point users to the new terminator-users group.


2008-09-20 03:14:50 +0100 / enh / revision 1460

src/terminator/TerminatorPreferences.java: use the new "feature test".


2008-09-19 22:35:32 +0100 / mad / revision 1459

src/terminator/TerminatorPreferences.java: We now have code for Windows which alleges to do opacity setting. It is only expected to work in 6u10 or greater, though no-one has tested that. In earlier releases, it'll spew exceptions into the log, below a message intimating that we've trapped them harmlessly in the setFrameAlpha method. Someone might be along to disable the slider if the JRE provably doesn't support setting the opacity but we need to enable it on Windows for now if anyone is to test the new code.

2008-09-19T14:16:09.908-0700 Terminator: Failed to apply frame alpha.
Associated exception:
java.lang.ClassNotFoundException: com.sun.awt.AWTUtilities
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at e.util.GuiUtilities.setFrameAlpha(GuiUtilities.java:346)
at terminator.TerminatorFrame.updateTransparency(TerminatorFrame.java:366)
at terminator.TerminatorFrame.addNotify(TerminatorFrame.java:362)
at java.awt.Window.pack(Unknown Source)
at terminator.TerminatorFrame.initFrame(TerminatorFrame.java:83)
at terminator.TerminatorFrame.<init>(TerminatorFrame.java:26)
at terminator.Terminator$3.run(Terminator.java:181)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at e.debug.EventDispatchThreadHangMonitor.dispatchEvent(EventDispatchThreadHangMonitor.java:191)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


2008-09-15 19:03:34 +0100 / enp / revision 1458

src/terminator/TerminatorPreferences.java: Remove extraneous question marks from preference setting labels: they're ugly, and other programs don't have them.


2008-09-14 03:30:41 +0100 / enh / revision 1457

src/terminator/LogWriter.java: we have a convenient wrapper around URLEncoder that deals with the "can't happen" exception.


2008-09-14 01:08:28 +0100 / enh / revision 1456

src/terminator/Terminator.java: remove misleading "throws" clause.


2008-09-14 00:40:22 +0100 / enh / revision 1455

src/terminator/model/TerminalModel.java: remove dead locals.


2008-09-14 00:37:18 +0100 / enh / revision 1454

src/terminator/Terminator.java: remove unused "throws" clause.


2008-09-13 17:36:14 +0100 / enh / revision 1453

bin/terminator:
src/terminator/terminal/PtyProcess.java: slightly simplify the way we pass Ruby's signal map to Java. I could have gone in the opposite direction, letting Ruby output the map in exactly its preferred form and force Java to work harder to parse it, but – with an eye to having "invoke-java.rb" always pass the signal map, I went for the choice that reduces the amount of stuff we pass and simplifies the parsing. I left the spaces in for the benefit of code wrapping the command line for output in a dialog box.


2008-09-02 23:07:51 +0100 / mad / revision 1452

www/faq.html: The JRE installer's "Custom" option seems to have been renamed.


2008-09-02 18:09:23 +0100 / mad / revision 1451

bin/terminator:
src/terminator/terminal/PtyProcess.java: Use a more compact representation for the signal number-to-name map, so the command line isn't quite so cluttered, so we stand more of a chance of seeing the whole command line, should Java exit with a failure status, even when using zenity. It's distressing to spend code on this but it doesn't turn out to be that much code and the command line clutter has irked people before (although I've always scoffed at them).


2008-08-28 05:57:06 +0100 / enh / revision 1450

src/terminator/TerminatorFrame.java: Egmont Koblinger made me realize this code's been broken for a long time without anyone noticing. componentShown is never called, so lastSize is never initialized, and componentResized always takes the early exit without doing anything.


2008-08-28 04:59:33 +0100 / enh / revision 1449

native/all/pty/PtyGenerator.h:
native/all/pty/terminator_terminal_PtyProcess.cpp: I don't know if p9term is going anywhere, but the number of unnecessary references to Terminator is the only real impediment to "PtyGenerator.h" being reused unmodified. PtyProcess could probably be turned into something more widely reusable too. I'm not going to do any of the hard work until I've a reason to, but since I'm here anyway, I'll do a bit of trivial tidying.


2008-08-28 04:15:52 +0100 / enh / revision 1448

native/all/pty/PtyGenerator.h: Egmont Koblinger points out a UTF-8 terminal like Terminator really ought to be setting the IUTF8 flag on its pseudo terminals. I was sure we'd already fixed this, but seemingly not.


2008-08-22 06:37:47 +0100 / enh / revision 1447

native/all/pty/PtyGenerator.h: a work-around for Sun bug 6354700, which is causing me a bit of trouble with an application that doesn't like having LD_LIBRARY_PATH set. There's a more thorough work-around we could try, but YAGNI.


2008-08-21 20:35:30 +0100 / mad / revision 1446

native/all/pty/PtyGenerator.h: This seems to work fine on Linux and Mac OS but stops the first terminal from working on Cygwin, every time, on at least three different machines. Back it out until I've had time to work out why and whether it's fixable.


2008-08-21 04:42:04 +0100 / mad / revision 1445

native/all/pty/PtyGenerator.h: Report an error message, even though it's not one that would mean something to most users, if we can't open the slave end of the pty. An easy way to do that seems to be checking it in the parent before forking. Cygwin has a hard-coded limit (via an array, iirc) on the number of ptys. I think today's report, from Ron Pagani, was the second time we've seen someone run out. In Ron's case, a previous Terminator crash looks to have left him with lots of orphaned bash processes. I can say that with some confidence because the same happened to me when I first tried to reproduce his issue with 64 terminals.

In other bad but probably unrelated news today, Mike Nguyen reports that his 10 tab Terminator running on XP always hangs by the time he comes back in the morning. He was very keen on the idea that it was the log file size that was doing it. I think it was more likely that he'd run out of memory. His new XP machine has 2 GiB of RAM, so I've relaxed the "100m" limit in his invoke-java.rb back to the default "1g". If that does "fix" it, then it'll be more evidence that it's worth trying to divine the amount of RAM... or bounding the scrollback.


2008-08-21 03:31:15 +0100 / mad / revision 1444

native/all/pty/PtyGenerator.h: I wondered if we needed to use the implementation in the Cygwin DLL to get a failure when we try to open too many terminals. I failed in all my attempts to use it but I think it was pointless anyway.


2008-08-21 02:50:56 +0100 / mad / revision 1443

native/all/pty/PtyGenerator.h: Starting 64 tabs from the command line, to try to break Cygwin, I see errors like this reported in the parent rxvt:

open("/dev/tty64", O_RDWR) failed: (No such file or directory)

That set me wondering if it's our error reporting that's killing Terminator on Windows. At some point, we switched from using std::cerr to using stderr because of crashes, but I don't have much faith that that's any safer.

Looking at calls to fprintf, I see one that doesn't look necessary safe, which I've fixed here. I can't see that being to blame but let's fix it anyway.

native/all/pty/terminator_terminal_PtyProcess.cpp: This use of stderr, unlike the one in the child, looks like it might conceivably happen from multiple threads at once.


2008-08-10 23:09:39 +0100 / mad / revision 1442

www/faq.html: devnu1l suggested the need for export TERMCAP=~/.termcap on RedHat. beerfan later convincingly demonstrated that it is indeed necessary. We were also missing the not entirely obvious step of installing Terminator's terminfo (although both reporters seem to have worked that out themselves). People often ssh into RedHat boxes that they never start GUI applications on. I'm not sure anyone's ever had any real success with a /usr/local/bin/vi link, coupled with setting EDITOR. We'll just have to deal with all the obsolete termcap files lying around, should we ever get back round to working on the terminal definition again.


2008-08-10 02:11:25 +0100 / enh / revision 1441

bin/terminator: it's not important in a short-lived script like this, but IO.read ensures we close the fd promptly, is slightly less verbose, and sets a good example in case we're copy & pasting to read files in a context where it might matter.


2008-08-10 00:39:27 +0100 / mad / revision 1440

bin/terminator: Searching my emails for problems with copy_metadata, called from FileUtils.cp when :preserve => true, I see that it is high time we found a better way. I'm always forgetting about the mkpasswd dance and we don't really know what it does well enough to insist that people run it. Perhaps it's a bad idea in an Windows installation with 35 000 users. All we're trying to do here is compare two poxy little compiled terminfo files to see if we should try to install a new one. Reading the whole file to compare it would be fine. Ruby encourages us to read it as a string, which led to some hand-wringing over the semantics of string equality. Fortunately, for our purposes here, it appears, from the source, to be a memcmp on the underlying byte array. By the time they get round to doing more sophisticated handling of, for example, combining diacritics, I expect we'll be able to rely on having at least Ruby 1.9, which would give us access to the underlying bytes, or let us change the encoding for both strings to Latin-1. They're never going to even try to pry the memcmp from our cold, grey beards.

"Beerfan" had fixed his own installation with some selective chmod()ing but was good enough to let us know about the latest occurrence of this problem. At least the combination of Ruby's and our error reporting is working well enough to give him the information to do that. His terminfo files had a plausible owner but ls -l displayed the group as "None". The exception he saw was Errno:EACCES. I don't think we'd seen that particular variant before.


2008-08-05 02:58:26 +0100 / mad / revision 1439

native/all/pty/terminator_terminal_PtyProcess.cpp: I think I've eliminated the possibility of a zero-byte read being the cause of Chris's recent Terminator crash here:

> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
> J  terminator.terminal.PtyProcess.nativeRead([BII)I
> J  terminator.terminal.PtyProcess$PtyInputStream.read([BII)I
> J  sun.nio.cs.StreamDecoder.readBytes()I
> J  sun.nio.cs.StreamDecoder.implRead([CII)I
> J  sun.nio.cs.StreamDecoder.read([CII)I
> J  terminator.terminal.TerminalControl$ReaderRunnable.run()V
> j  java.lang.Thread.run()V+11 v  ~StubRoutines::call_stub

I've deliberately provoked zero-byte reads and writes, using the same version of Cygwin as Chris was running. I saw no ill effect.


2008-07-27 00:48:39 +0100 / enh / revision 1438

src/terminator/view/JTerminalPane.java: lose the code implementing decoding of numeric selections (and the even more generally useful InfoAction) to the library.


2008-07-14 19:16:53 +0100 / mad / revision 1437

TODO: John Russell points out a case where we could try to support xterm capabilities. We've not made any progress on this front in years, due to not wanting to cause problems with old versions of Terminator's terminfo. Perhaps this indicates a way in which we can move forwards.


2008-07-14 04:22:08 +0100 / enh / revision 1436

www/faq.html: add a TOC to the Terminator FAQ.


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 2006-04-27. This is the only mechanism by which our terminfo gets installed on Cygwin. Or not, since then.

This actually makes things worse because the terminfo isn't getting included in the Cygwin installer.


2007-02-02 06:21:52 +0000 / enh / revision 1183

src/terminator/Options.java: Sébastien Pierre points out that, though I long since rewrote this code so that we always store preferences in the correct type internally, I'd actually made things even less efficient because now I was converting each value to a string and then back into the type it started as. While I'm here, add the traditional warning that the configuration file is written to by a program.


2007-02-01 07:59:18 +0000 / mad / revision 1182

Makefile: Gah, missed one check-in. Oh well, now I know that you can still build everything without simple.make.


2007-01-23 19:16:39 +0000 / enh / revision 1181

bin/terminator: explain why we need to finish the GNOME startup process in the script as well as the Java.


2007-01-23 19:11:20 +0000 / mad / revision 1180

bin/terminator: Don't (inadvertently) try to modify the DISPLAY environment variable.


2007-01-23 18:30:53 +0000 / mad / revision 1179

bin/terminator: Fix what I broke ten minutes ago - cope with unset DISPLAY variables without doing:

martind@mdorey /cygdrive/c/Program Files/software.jessies.org/terminator
$ ./bin/terminator
./bin/terminator:94: private method `gsub' called for nil:NilClass (NoMethodError)

martind@mdorey /cygdrive/c/Program Files/software.jessies.org/terminator
$


2007-01-23 18:24:26 +0000 / mad / revision 1178

bin/terminator: Dear, oh dear - how many problems? At least this one was the fault of my per-architecture changes the other day. Fix:

$ DEBUGGING_TERMINATOR=y ../terminator/bin/terminator
/Projects/salma-hayek/bin/invoke-java.rb:352:in `exec': No such file or directory - /Projects/salma-hayek/.generated/Cygwin/bin/launcher (Errno::ENOENT)
        from /Projects/salma-hayek/bin/invoke-java.rb:352:in `invoke'
        from ../terminator/bin/terminator:197
$


2007-01-23 18:14:55 +0000 / mad / revision 1177

bin/terminator: Interesting that no-one's noticed that this call to finish the gnome startup nonsense has been broken since:

2006-10-22 18:45:12 -0700 enh (1813)

I still wouldn't have noticed except that I've "broken it more" by renaming the Linux directory and I wouldn't have noticed that except that I was searching for the gnome-startup stuff because some other code is now trying to run gnome-startup (with the "start" option) on Cygwin.

I haven't tested this, so it probably still doesn't work. Looking at what happens when I start a second Terminator, is this code obsolete anyway?


2007-01-23 17:56:50 +0000 / mad / revision 1176

src/terminator/Terminator.java: Why were we duplicating the appending of $DISPLAY here...

bin/terminator: ... when we were already passing most of the name from here?

I think rxvt on my Cygwin installation is setting $DISPLAY to :0 before forking its bash child. (I can find no evidence of $DISPLAY elsewhere.) This was preventing me from starting Terminator from rxvt.

$ DEBUGGING_TERMINATOR=true /cygdrive/c/Program\ Files/software.jessies.org/terminator/bin/terminator
/usr/lib/ruby/1.8/pathname.rb:771:in `chmod': Invalid argument - /cygdrive/c/Documents and Settings/martind/.terminator/terminator-server-port:0.secret (Errno::EINVAL)
        from /usr/lib/ruby/1.8/pathname.rb:771:in `chmod'
        from /cygdrive/c/Program Files/software.jessies.org/salma-hayek/bin/invoke-java.rb:50:in `initialize'
        from /cygdrive/c/Program Files/software.jessies.org/terminator/bin/terminator:39:in `new'
        from /cygdrive/c/Program Files/software.jessies.org/terminator/bin/terminator:39:in `tryInAppServer'
        from /cygdrive/c/Program Files/software.jessies.org/terminator/bin/terminator:93
$

If I installed Cygwin/X, then I presume I might well have $DISPLAY legitimately set to :0. I've converted colons to underscores in the $DISPLAY part of the name. I haven't touched the earlier part of the filename, with an eye to allowing it to work with native-style paths, should we ever get serious about fixing the other problems with that (documented in the TODO file).


2007-01-22 06:38:45 +0000 / enh / revision 1175

src/terminator/view/JTextBuffer.java: use generics to move the casts inside the implementation.

src/terminator/FindDialog.java:
src/terminator/view/JTerminalPane.java: lose casts.

src/terminator/TerminatorMenuBar.java: add a new action to cancel the current find. I'll still be a C-F Escape man myself, mind.


2007-01-22 03:26:55 +0000 / enh / revision 1174

www/index.html: remove boilerplate.


2007-01-21 22:45:43 +0000 / mad / revision 1173

TODO: In the unlikely event that anyone complains about the stty -ixon feature, we can refer them here, in case they happen to be motivated enough and skilled enough to implement a better solution to the same problem. I'm sure we'd happily commit a tasteful solution.


2007-01-21 22:39:22 +0000 / mad / revision 1172

www/index.html: Some of the competition behaves even worse than jumping to the bottom, keeping the scrollbar at the same position in their fixed size, circular scroll buffer. Clearly not the user's intention!


2007-01-21 21:58:40 +0000 / enh / revision 1171

www/index.html: a couple more improvements.


2007-01-21 21:49:59 +0000 / enh / revision 1170

www/index.html: more improvements. Does no-one ever read through this stuff? :-)


2007-01-21 21:47:54 +0000 / enh / revision 1169

www/index.html: more corrections and tidying after reading the page in a browser.


2007-01-21 21:44:21 +0000 / enh / revision 1168

www/index.html: I always write "<string>" instead of "<strong>". I wish our coloring was intelligent enough to mark invalid tags!


2007-01-21 21:41:16 +0000 / enh / revision 1167

www/index.html: explicitly mention "unlimited scrollback" and "intelligent vertical scrolling" as features. They may be obvious to the point of necessity, but they still make us stand out from the competition, and they also provide the best segue into our XON/XOFF behavior (at the cost of the list of features no longer being in alphabetic order, which doesn't seem important). Also remove the promise of a feature (monitoring XON/XOFF status) that as far as we know is impossible to implement on any of our supported platforms. But, since displaying the state was my first thought, and mad just reinvented the idea, explicitly mention why we didn't just take the less contentious route.


2007-01-21 21:15:46 +0000 / mad / revision 1166

www/index.html: Chris supplied a more plausible reason for using XOFF.


2007-01-20 07:29:18 +0000 / enh / revision 1165

www/index.html: expand on the XON/XOFF situation.


2007-01-19 05:33:23 +0000 / enh / revision 1164

native/all/pty/PtyGenerator.h: disable output XON/XOFF on the terminal, because it only confuses people. Anyone expert (and strange) enough to want it can always turn it back on with stty(1).

www/index.html: mention this in the documentation, since no other terminal emulator I'm aware of does this. Also a minor improvement to an unrelated sentence.


2007-01-15 01:27:54 +0000 / enh / revision 1163

src/terminator/Options.java: martind points out that with the last revision:

> if I uncheck the block cursor setting,
> then it disappears from ~/.terminator/options but remains in
> ~/.terminator-settings.  This means that block cursor setting comes  
> back when I start a new Terminator.

so let's try more aggressively to get rid of the old file. We'll still read in the old file, but then we'll try to write it out in the new location, and if that was successful we'll try to remove the old file. This should move everyone [who upgrades] over as quickly as possible.


2007-01-12 06:45:47 +0000 / enh / revision 1162

bin/terminator:
src/terminator/Options.java: fix a "FIXME" now Chris Reece has been bitten by it. We still read options from "~/.terminator-settings", but they're overridden by "~/.terminator/options", and we now only write changes to the latter.


2007-01-10 06:39:03 +0000 / enh / revision 1161

src/terminator/FindDialog.java: track API change.


2007-01-09 04:19:28 +0000 / mad / revision 1160

src/terminator/view/JTextBuffer.java: Rename scrollToBottom such that the name hints at the sideways scrolling, for clarity, and publish the method for scrolling horizontally, so...

src/terminator/view/JTerminalPane.java: ... I can do the scrolling to the bottom immediately but leave the horizontal scrolling to be delayed by the complicated timer mechanism I put in to solve Min Xu's issues with vimdiff and mutt. (I had to rename one of the timers, which otherwise would have been misleadingly named - and this unfortunately obscures the motivating change. The name's still not good, but at least what I'm trying to say with the name is now right, even if I haven't got the right words.)

src/terminator/TerminatorMenuBar.java: Adapt to the Bottom/End change.

It's been annoying me ever since I put the last change in for Min Xu that pressing a key doesn't take me immediately to the sticky bottom of the scrollbar, so I get to see new output. The horizontal scrolling's been working fine, or at least better than any previous version, but I've missed the immediate vertical scrolling almost every day. I should have read the source code earlier and trained myself to press End rather than Enter but this is a good change anyway.


2006-12-19 06:27:14 +0000 / enh / revision 1159

www/index.html: remove dead markup.


2006-12-19 06:25:44 +0000 / enh / revision 1158

src/terminator/Options.java:
src/terminator/view/JTextBuffer.java: make it possible to disable hiding of the mouse pointer/cursor when typing. This can provoke a Cygwin X11 server bug that causes the mouse cursor to permanently disappear.


2006-12-18 19:08:12 +0000 / mad / revision 1157

www/index.html: Remove forbidden link end tag.


2006-12-17 19:57:06 +0000 / enh / revision 1156

www/index.html: add a missing P tag.


2006-12-16 04:49:32 +0000 / enh / revision 1155

www/index.html: lose Cygwin/Ruby/Windows problems that aren't specific to Terminator to the new page; inline the remaining Cygwin less(1) problem into the ncurses section. Give better titles to two other sections.


2006-12-14 17:30:21 +0000 / mad / revision 1154

Nikos Tzanos isn't the first person to trip over "the ubygems problem" when trying to start Terminator. (He was certainly following in my footsteps.)

www/index.html: So we should mention it on a web page. The potential problems when starting our shortcuts are mentioned on the Terminator web page, even when they'd apply to Evergreen too, so I've done that here too.

TODO: We don't need two copies of this information about "ubygems" but the discussion about what we need to do to support the native Ruby probably does still belong in TODO.


2006-12-12 19:21:22 +0000 / enh / revision 1153

src/terminator/view/JTextBuffer.java: clarify a poorly-worded comment.


2006-12-12 19:13:39 +0000 / enh / revision 1152

src/terminator/view/JTextBuffer.java: Nikos Tzanos complains that we don't work well with bold text in the ProggySquare font. The trouble is that the font we get back from deriveFont has wider metrics, but we assume that bold variants have the same metrics as the plain variant. We were already using "overstrike" to embolden on Mac OS, so let's use it everywhere and sweep these bold font problems under the carpet. It looks better than you'd imagine.


2006-12-09 21:15:11 +0000 / enh / revision 1151

src/terminator/TerminalDropTarget.java: be a better drop target on Linux, where Nautilus will offer us "text/uri-list", which the JVM can't translate to DataFlavor.javaFileListFlavor. I've moved the DataFlavor.stringFlavor handling to be last, because it seems like we should always go for a higher-level flavor if we can.


2006-11-29 05:02:10 +0000 / enh / revision 1150

www/index.html: since named colors are pretty much deprecated, let's not advertise them.


2006-11-29 04:50:04 +0000 / enh / revision 1149

src/terminator/Options.java: none of our hard-coded "rgb.txt" locations actually exist on post-XFree86 Linux boxes. So add in the current set of likely candidates.


2006-11-29 04:38:41 +0000 / enh / revision 1148

src/terminator/TerminatorFrame.java:
src/terminator/view/JTerminalPane.java:
src/terminator/view/JTextBuffer.java: Daniel Stamp complains that changing the background color doesn't update existing terminals correctly. The background to the text changes, but the "empty space" doesn't. Fix this (and a few other of the preferences) by paying more attention in our optionsDidChange methods, and making more of an effort to fix up existing terminals.


2006-11-24 06:12:01 +0000 / enh / revision 1147

src/terminator/Terminator.java: add our contact address to the about box.

src/terminator/FindDialog.java: add a link to the regular expression documentation from our find dialog.


2006-11-17 19:57:26 +0000 / mad / revision 1146

src/terminator/view/JTerminalPane.java: Min Xu's still not happy - he's still having problems with mutt and vimdiff. I did reproduce his problems last time but only intermittently. So I came up with a one line piece of Ruby test code (which I've left in a comment) to simulate what might be happening when you press the down arrow when vimdiff's on the end-of-line position on a file with long lines.

Cancelling the timer when starting it helped and upping the timeout to 200ms helped when using cat on jessies.org from California. But the majority of the change here is to check that output has quiesced before deciding to scroll. Min Xu's previously opined that the mutt and vimdiff cursor is only off-screen briefly. This stops that sort of behavior from causing scrolling and, indeed, stops automatic scrolling if output is continuing.


2006-11-13 20:10:32 +0000 / enh / revision 1145

src/terminator/view/JTerminalPane.java: Seth Green points out that we don't handle control-' ' correctly, which matters for emacs(1), and provided a patch. It turns out there are a couple of other cases we didn't handle correctly either, so fix those too while we're here.


2006-11-10 22:49:46 +0000 / enh / revision 1144

src/terminator/Terminator.java: lose code to salma-hayek.


2006-11-10 22:24:03 +0000 / enh / revision 1143

src/terminator/view/JTerminalPane.java: in the last couple of weeks, Jonathan Shea and Seth Green have both asked us to support meta, for the benefit of emacs(1). Handling the key events is simple, but we also need to turn input methods on or off, depending on whether the alt key is being used as meta.

src/terminator/Options.java: ...which means a new option...

src/terminator/Terminator.java: ...a more general scheme for updating windows when options change (previously they were just repainted)...

src/terminator/TerminatorFrame.java: ...and an expedient hack of replacing the menu bar when the modifier keys change. I tried fixing the menu in place, but that was difficult and messy.


2006-11-10 00:45:59 +0000 / enh / revision 1142

src/terminator/view/JTerminalPane.java: don't bothering making the user confirm that they're closing a terminal whose underlying pty has already been closed.


2006-11-09 21:10:47 +0000 / enh / revision 1141

src/terminator/terminal/escape/SingleCharEscapeAction.java: explain this class a little better.


2006-11-09 19:59:46 +0000 / enh / revision 1140

src/terminator/terminal/TerminalControl.java: susiw noticed that ^N was processed well ahead of where it ought to be. Proper escape sequences work by adding TerminalActions to a queue, but single-character sequences such as ^N and ^O are handled alongside normal characters, so we need to explicitly queue their actions. (Note that SingleCharEscapeAction is a somewhat misleading name. It actually handles two-character sequences consisting of ASCII ESC followed by a single character.)


2006-11-04 08:08:08 +0000 / enh / revision 1139

native/all/pty/terminator_terminal_PtyProcess.cpp: fix a minor bug martind complained about back on 2006-03-17, and one I noticed just today.


2006-11-04 01:25:07 +0000 / enh / revision 1138

src/terminator/FindDialog.java: track API change.

src/terminator/Options.java: track API change and take advantage of it to keep the dialog up if we weren't able to save the preferences.


2006-10-21 07:26:29 +0100 / enh / revision 1137

src/terminator/TerminatorTabbedPane.java: use the known-safe "<html><body>" instead of just "<html>" when giving HTML to Swing.


2006-10-12 04:13:06 +0100 / enh / revision 1136

src/terminator/TerminatorFrame.java: Min Xu (Hsu) points out that we shouldn't increase the size of a maximized window on Windows, because it will happily let us expand the window so that it no longer fits on the display!


2006-10-08 03:22:29 +0100 / enh / revision 1135

www/index.html: use an SSI include for the downloads section.


2006-10-01 06:25:56 +0100 / enh / revision 1134

src/terminator/InfoDialog.java: an improved work-around for one of the GTK LAF's bugs: the fact that setBorder(null) doesn't stop a JTextField's border from being drawn.


2006-10-01 05:36:22 +0100 / enh / revision 1133

bin/terminator: change our directory structure a little. We have a top-level "~/.terminator/", under which we keep most of our files (I haven't moved the preferences yet, because that's more delicate), and under which we have a separate "logs" directory. Also make a better effort to keep the directory's permissions such that it's "safe". Finally, rename the application logs to have a convenient common extension.

src/terminator/LogWriter.java: cope better with an inability to open a log file for writing.

src/terminator/Terminator.java: get the server-port filename stem from a system property, so the knowledge is all in the start-up script.


2006-09-29 06:09:33 +0100 / enh / revision 1132

src/terminator/view/highlight/SelectionHighlighter.java: prefer a belt-and-braces approach to the empty-selection problem. It wasn't an unreasonable assumption that no visible selection corresponds to "highlight" being null. At the same time, it wasn't an unreasonable assumption that it shouldn't be possible to select an empty sequence of characters.


2006-09-29 06:01:38 +0100 / enh / revision 1131

native/all/pty/PtyGenerator.h:
native/all/pty/terminator_terminal_PtyProcess.cpp: our unusual arrangement that gives us Cygwin-using JNI DLLs has the side-effect that using std::cerr causes the JVM to crash (in Cygwin code). Seemingly stdio still works, though, so let's stick to that here, for portability.


2006-09-28 20:04:57 +0100 / enh / revision 1130

src/terminator/view/highlight/SelectionHighlighter.java: "Kevin C" had trouble because we weren't coping with zero-length pastes, but it was our fault he had a zero-length (but non-empty) clipboard in the first place. So fix that aspect too.


2006-09-28 19:58:18 +0100 / enh / revision 1129

native/all/pty/terminator_terminal_PtyProcess.cpp: "Kevin C" reported that he could crash Terminator on Windows XP thus:

  However, this did lead me to an interesting finding. If I blank the
  clipboard [using the delete toolbar icon in "clipbrd.exe"] and then
  double-click in Terminator's cli frame in an area
  where these is no text, the clipbrd.exe delete button will reappear but
  nothing is visible in the clipboard. A subsequent attempt to paste will
  result in Terminator crashing every time.

It turns out that Cygwin's not happy with zero-length writes. I also notice that we're not checking that GetByteArrayRegion doesn't throw an exception, so – although that wasn't the problem – I've fixed that too (and tested it by deliberately breaking the Java side).


2006-09-19 19:44:40 +0100 / enh / revision 1128

src/terminator/terminal/TerminalControl.java: fix this Terminator deadlock by doing the UI manipulation from the event dispatch thread instead:

  2006-09-19T11:32:46.767-0700 Terminator: deadlock detected involving the following threads:
  2006-09-19T11:32:46.769-0700 Terminator: Thread #19 Process 25275 (/dev/pts/14) Reader (BLOCKED) waiting on java.awt.Component$AWTTreeLock@b2a2d8 held by AWT-EventQueue-0
    java.awt.Container.clearCurrentFocusCycleRootOnHide(Container.java:3124)
    java.awt.Component.hide(Component.java:1446)
    java.awt.Component.show(Component.java:1421)
    java.awt.Component.setVisible(Component.java:1372)
    javax.swing.JComponent.setVisible(JComponent.java:2605)
    terminator.TerminatorTabbedPane.updateSpinnerVisibilities(TerminatorTabbedPane.java:111)
    terminator.TerminatorTabbedPane.fireStateChanged(TerminatorTabbedPane.java:101)
    javax.swing.JTabbedPane.removeTabAt(JTabbedPane.java:965)
    javax.swing.JTabbedPane.remove(JTabbedPane.java:1003)
    terminator.TerminatorFrame.closeTab(TerminatorFrame.java:251)
    terminator.TerminatorFrame.closeTerminalPane(TerminatorFrame.java:241)
    terminator.view.JTerminalPane.doCloseAction(JTerminalPane.java:658)
    terminator.terminal.TerminalControl.handleProcessTermination(TerminalControl.java:210)
    terminator.terminal.TerminalControl.access$400(TerminalControl.java:22)
    terminator.terminal.TerminalControl$TerminalRunnable.run(TerminalControl.java:129)
    java.lang.Thread.run(Thread.java:619)
  2006-09-19T11:32:46.769-0700 Terminator: Thread #12 AWT-EventQueue-0 (BLOCKED) waiting on terminator.TerminatorTabbedPane@1b26af3 held by Process 25275 (/dev/pts/14) Reader
    java.awt.Component.getName(Component.java:787)
    com.sun.java.swing.plaf.gtk.GTKStyle.isOpaque(GTKStyle.java:538)
    javax.swing.plaf.synth.SynthLookAndFeel.paintRegion(SynthLookAndFeel.java:361)
    javax.swing.plaf.synth.SynthLookAndFeel.updateSubregion(SynthLookAndFeel.java:337)
    javax.swing.plaf.synth.SynthTabbedPaneUI.paintTabArea(SynthTabbedPaneUI.java:308)
    javax.swing.plaf.synth.SynthTabbedPaneUI.paint(SynthTabbedPaneUI.java:279)
    javax.swing.plaf.synth.SynthTabbedPaneUI.update(SynthTabbedPaneUI.java:200)
    javax.swing.JComponent.paintComponent(JComponent.java:758)
    javax.swing.JComponent.paint(JComponent.java:1022)
    javax.swing.JComponent.paintChildren(JComponent.java:859)
    javax.swing.JComponent.paint(JComponent.java:1031)
    javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
    javax.swing.JComponent.paintChildren(JComponent.java:859)
    javax.swing.JComponent.paint(JComponent.java:1031)
    javax.swing.JComponent.paintToOffscreen(JComponent.java:5104)
    javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
    javax.swing.RepaintManager.paint(RepaintManager.java:1132)
    javax.swing.JComponent._paintImmediately(JComponent.java:5052)
    javax.swing.JComponent.paintImmediately(JComponent.java:4862)
    javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:727)
    javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:683)
    javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:663)
    javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
    java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    e.debug.EventDispatchThreadHangMonitor.dispatchEvent(EventDispatchThreadHangMonitor.java:191)
    java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    java.awt.EventDispatchThread.run(EventDispatchThread.java:121)


2006-09-14 21:18:43 +0100 / mad / revision 1127

src/terminator/TerminatorMenuBar.java: "is some precedent" is a much more common usage according to google. I think dictionary.com supports my first thought on reading this that it's a more correct usage too.


2006-09-13 07:21:10 +0100 / enh / revision 1126

src/terminator/TerminatorMenuBar.java: switch back to command left/right (alt left/right) for moving to the previous/next tab. Elias Naur made us realize that { and } are quite awkward to type on a lot of non-English keyboard layouts.


2006-08-31 18:59:29 +0100 / mad / revision 1125

src/terminator/model/TextBuffer.java: The cursor movement constraining code kept mildly confusing me with its carefully ordered reassignment of the same parameter. If we use (x, y) to mean the 1-based parameter coordinate system and keep (lineIndex, charOffset) to mean the 0-based internal coordinate system, it gets perhaps a little clearer. My motivation was to make it more obvious that I'd added some duplication by copying one of the constraints to moveCursorHorizontally. Now the two versions of that line are identical, though I've currently disabled the copy I introduced.

Because I had another change in the same file which I wanted to check-in first, I cut and pasted the whole file into another file, then pasted it back again afterwards. That's why various other lines have changed cosmetically, to reflect Evergreen's current auto-indenter.


2006-08-31 05:50:24 +0100 / mad / revision 1124

src/terminator/view/JTerminalPane.java: Since I earlier stopped us scrolling horizontally when we're at the "sticky bottom" of the scrollbar, the scroll-on-keypress is all that's attempting to keep the cursor visible. Scrolling to the cursor as soon as the key's pressed - like we were doing before this delaying patch - only works when the key causes no display output. When the key causes display output, that output will follow somewhat later.

If you're to have a good interactive experience, the output has to happen in roughly human reaction time which is ~100ms. That's usually the case when we're typing into cat(1) or Titan serial consoles. There is fundamentally no way to reliably tie up keyboard input with remotely generated output. Assuming that anything which happens within one reaction period of a keypress was the direct consequence of that keypress seems about the best we could do.

If we don't do this, the automatic horizontal scrolling works one character behind in the normal case. That's really quite tedious.


2006-08-31 03:41:33 +0100 / mad / revision 1123

src/terminator/model/TextBuffer.java: Back out the change which completely broke line editing on Titan consoles. The left arrow key would jump the cursor back to the 79 (or 78) column position and you'd never see auto-scrolling because we auto-scroll to the cursor position - which is no longer ever greater than column 79.

TODO: I think the scroll-on-key should be delayed a little to give the key's output time to come cause the cursor to move further right.


2006-08-31 02:59:06 +0100 / mad / revision 1122

src/terminator/view/JTextBuffer.java: If we allege to constrain all cursor movement to within the bounds of the declared terminal size, then the only way the cursor would not be visible is if someone had manually scrolled the window. If they've manually scrolled the window, then we shouldn't automatically scroll it back just because the program output a cursor movement sequence. Well, at least not unless the scrollOnTtyOutput setting is set, which it normally isn't. I haven't checked for that here.

Either of this or the previous change are, on their own, sufficient to stop aptitude update from auto-scrolling sideways, while leaving the "0s" remaining timer in the bottom, right character cell, as presumably intended. Bon.

Hopefully this will also fix Min Xu's mutt problem.


2006-08-31 02:53:37 +0100 / mad / revision 1121

src/terminator/model/TextBuffer.java: My previous change didn't fix my occasional annoyance with aptitude update. That turned out to be due to us allowing the cursor to be positioned off the right hand edge of the screen by using the horizontal cursor movement ("tput cuf") sequence.

gnome-terminal constraining the cursor movement in response to this:

tput cup 40 79; tput cuf 10; echo -n a; tput cup 40 40

That made me think that we should too - as we do for bidirectional cursor movement in the method above. I'd noticed this inconsistency before but it's a pain to prove such things are wrong, rather than carefully thought out.

The next change will eliminate the need for this change, so even if this turns out to be flawed, we should still have solved today's problem.


2006-08-31 02:47:16 +0100 / mad / revision 1120

src/terminator/view/JTextBuffer.java: Never automatically scroll sideways on terminal output. I haven't touched, or changed the behavior of, all the places in the code where we scroll to bottom via keypress or menu item. That means that the original motivation for the auto-sideways scrolling code isn't broken by this change. The original motivation for the scrolling was to scroll when editing long lines on a BlueArc Titan serial console - which doesn't auto-wrap like bash. Editing involves keypresses - and they still scroll sideways. We might want to rename scrollToBottom to make that explicit.

This is the first of a series of changes prompted by Min Xu's problem with mutt. This one's only sufficient to fix my first simple demonstration of a problem:

The existing presence of a horizontal scrollbar is a necessary precondition to see the problem. This line on its own causes no scrolling in a freshly created, default-sized window:

tput cup 40 79; echo -n a; tput cup 40 50

But when preceded by something to create a scrollbar of noticeable size:

ruby -e '(1..82).each() {|ii| $stdout.write("k"); }; puts();'

The tput line causes scrolling.


2006-08-24 21:52:42 +0100 / enh / revision 1119

TODO: add an RFE.


2006-08-24 06:21:49 +0100 / enh / revision 1118

TODO: job done.


2006-08-24 06:00:51 +0100 / enh / revision 1117

src/terminator/LogWriter.java: add a flush method so we can explicitly flush the underlying stream.

src/terminator/InfoDialog.java: add a "Show in Finder" button to the info dialog, and flush the stream before showing the file; the user probably doesn't want to see an out-of-date log.


2006-08-23 04:33:40 +0100 / enh / revision 1116

TODO: jobs done.


2006-08-19 23:44:23 +0100 / enh / revision 1115

src/terminator/terminal/TerminalControl.java:
src/terminator/TerminatorTabbedPane.java: get closer to the desired spinner behavior, and improve the tab ear appearance by putting some space between the label and the spinner.


2006-08-19 23:07:59 +0100 / enh / revision 1114

src/terminator/TerminatorTabbedPane.java: if we're running on a new enough Java runtime (Java 6 or later), use custom tab ears with spinners showing when there's new output on each tab. If we're running on an older runtime (Java 5), use the default tab ears.

src/terminator/terminal/TerminalControl.java: animate the spinners.

src/terminator/TerminatorFrame.java: remove the "to-do" from the source.


2006-08-12 21:14:45 +0100 / enh / revision 1113

www/index.html: several people have had trouble with their profiles explicitly setting TERM to "xterm-color". Our intention of making our escape sequences more in line with XTerm than (as at present) RXvt will only make these problems harder to spot, so let's explicitly suggest that the user check.


2006-08-02 00:29:43 +0100 / enh / revision 1112

src/terminator/model/TextBuffer.java: Sebastien Estienne reports that Emacs doesn't work correctly in Terminator when moving right through text; two characters disappear after every six correctly-displayed characters. It turns out that though Emacs normally uses "\e[C" to move right, when it knows it's at a tab stop, it uses "\t\b\t", and Terminator was overwriting characters on the display instead of just moving the cursor. Vim was okay because it just outputs the character at the cursor to move right, because no sequence can be shorter than that. Copying text from (say) the output of cat(1) still works because we now consider tabs at the ends of lines to be inserts rather than simple cursor movements.


2006-07-28 18:51:34 +0100 / mad / revision 1111

www/index.html: Track source-dist .tgz to .tar.gz change.


2006-07-24 16:53:49 +0100 / enh / revision 1110

src/terminator/view/JTerminalPane.java: John Douthat points out the the keypad enter key does nothing on Mac OS. As with the esc key, it's because we don't get a KEY_TYPED event (but do on Linux), so we have to recognize the situation and process the KEY_PRESSED instead (the key location for me is KEY_LOCATION_NUMPAD, though I don't know if that's also true on a MacBook).


2006-07-04 19:59:47 +0100 / enh / revision 1109

src/terminator/Terminator.java: cool Safari-like tabs are a lot of work, but making normal tabs smaller is trivial. This should make tabbed Terminator windows more convenient on Mac OS.


2006-06-29 02:48:24 +0100 / enh / revision 1108

src/terminator/terminal/escape/CSIEscapeAction.java:
src/terminator/terminal/escape/SingleCharEscapeAction.java: while I'm here, "ESC Z" is supposed to be the same as "ESC [ c", so it's odd that we implement the latter but not the former.


2006-06-29 02:28:12 +0100 / enh / revision 1107

src/terminator/terminal/escape/CSIEscapeAction.java: fix a problem where we were misinterpreting requests to restore DEC private mode values as a request to reset the scrolling region. This patch doesn't implement save/restore DEC private mode values, but it does at least recognize them and produce an appropriate warning in the log. Also fix the style of the switch statement so we can edit it more conveniently, and change the name of setScrollScreen to setScrollingRegion, to correspond with the usual terminal terminology.

src/terminator/model/TextBuffer.java: track name change.


2006-06-24 19:01:17 +0100 / enh / revision 1106

www/index.html: a few attempted clarifications of our terminfo-related documentation, plus stylistic improvements.


2006-06-05 17:18:05 +0100 / enh / revision 1105

COPYING: update the FSF address; missed this when I did the others.


2006-05-26 02:58:42 +0100 / enh / revision 1104

src/terminator/view/JTextBuffer.java: ensure that the new match is highlighted in the bird view as well as in the text itself.


2006-05-22 23:37:22 +0100 / mad / revision 1103

www/index.html: Our man in Basel reports:

org.jessies.terminator.rpm built on ithaki on Sun 21 May 2006 06:21:02
PM CEST, containing r1102 (1673) installs properly (modulo moaning about
ruby, but that's my fault for not using a ruby rpm) and starts OK.

result.

[ed@lexone ed]$ cat /etc/SuSE-release
Novell Linux Desktop 9 (i586)
VERSION = 9
RELEASE = 9

(essentially the same as suse 9.1, i think).

-ed


2006-05-19 10:01:56 +0100 / mad / revision 1102

src/terminator/terminal/escape/CSIEscapeAction.java: The xterm control sequences page and the xwsh man page both say that CSI %d M is for deleting lines. Having a scrollDisplayUp method call scrollDisplayDown can't have been right. The long terminfo name of the capability we've mapped this to is parm_delete_line. The method's name should surely reflect that.

src/terminator/model/TextBuffer.java: The xwsh man page says that we should start deleting at the current line.

This improves our behavior when nvi (Linux) or vi (Solaris) delete lines in response to a user "dd" command.


2006-05-19 09:08:38 +0100 / mad / revision 1101

native/all/pty/PtyGenerator.h: The Linux man page for select says that, if you're going to use the pre-POSIX headers, you should include sys/time.h. This didn't help.

native/all/pty/terminator_terminal_PtyProcess.cpp: The _BSD_SOURCE macro gets us WCOREDUMP on gooch but the Linux man page says that it's not a POSIX thing and should be wrapped in an #ifdef.


2006-05-18 23:21:56 +0100 / mad / revision 1100

Makefile: A first step towards sorting out the capitalization problems more robustly. We'll take a default from the directory name but make(1) will let us override that, as here, without causing a huge amount of disruption.


2006-05-18 06:52:01 +0100 / mad / revision 1099

www/index.html: I made the .deb filenames the same as the package name.


2006-05-16 04:52:24 +0100 / mad / revision 1098

src/terminator/Terminator.java: Only listen on the loopback address. Fall back to the wildcard address if we can't find the loopback address with both hands and a map. Thank-you checked exceptions.

bin/terminator: Simplify the comment - now we have to connect to localhost.

Without this change, XP's firewall, in its default configuration, will - quite reasonably - pop up a warning and (unbeknownst to Terminator) deny access to Terminator's InAppServer from everything but the loopback interface. We don't actually ever want to connect to Terminator's InAppServer from any other interface, so let's not ask for more access than we need, even though it means jumping through some hoops.


2006-05-16 03:05:43 +0100 / mad / revision 1097

src/terminator/view/JTextBuffer.java: Remove unused variable from the last time I was debugging x2vnc. Removing it doesn't seem to affect what gets sent to x2vnc.


2006-05-15 02:39:55 +0100 / enh / revision 1096

TODO: tidying and additions.


2006-05-15 01:51:30 +0100 / enh / revision 1095

www/index.html: include our new header.


2006-05-15 01:15:09 +0100 / enh / revision 1094

www/index.html: use the salma-hayek style here too.


2006-05-14 23:02:26 +0100 / mad / revision 1093

www/index.html: Go public with the .deb, now we're uploading it every night.


2006-05-14 22:58:28 +0100 / enh / revision 1092

www/index.html: remove the fancy typography from the first paragraph, which gets extracted for plain-ASCII use in package descriptions.


2006-05-14 22:53:30 +0100 / enh / revision 1091

www/index.html: replace the now-dated "Mac OS X" with just "Mac OS".


2006-05-14 22:27:21 +0100 / enh / revision 1090

www/index.html: I've been reading the first paragraph of Terminator's web page a lot as I've been working on building ".deb" packages, and its awkwardness has been bothering me all that time.


2006-05-14 22:03:21 +0100 / mad / revision 1089

www/index.html: "Shortly" my ass but it is fixed now.


2006-05-14 21:39:06 +0100 / mad / revision 1088

www/index.html: The raison d'être for Terminator's terminfo file is occasionally but repeatedly forgotten.


2006-05-14 21:30:53 +0100 / mad / revision 1087

www/index.html: Lose the intimidating building-from-source section to salma-hayek. Gain a long-overdue link to salma-hayek's index.html.


2006-05-14 21:24:25 +0100 / mad / revision 1086

www/index.html: OK, now it's ready. I hate editing markup.


2006-05-14 21:20:54 +0100 / mad / revision 1085

www/index.html: Terminator doesn't need a C++ compiler to run. Building salma-hayek entails compiling some C++ that isn't JNI-related but it would be a shame to lose the detail that Terminator only uses C++ for pty support. Someone ranted to the list about our use of Ruby. We should probably mention that anyway.

The "Building from source" section should now be ready for pulling out into salma-hayek.

bin/terminator: Document why we can't do the shell selection in Java on Cygwin, even in Java 6.


2006-05-14 20:36:10 +0100 / mad / revision 1084

www/index.html: While real people are only interested in Terminator, perhaps this is a sensible home for "Building from source" issues which apply to all the projects. Simon Pamies hasn't yet reported a successful build but this is apparently likely to be one of the obstacles he'll encounter.


2006-05-14 19:21:13 +0100 / mad / revision 1083

www/index.html: The section on re-running the JRE installer to get a better font than Courier only applies (afaik) to Running on Windows, certainly not to building from source.


2006-05-09 22:33:47 +0100 / mad / revision 1082

www/index.html: We haven't tried to build the native binaries from bin/terminator for a while. I can't see us resurrecting that. Chris Oklota wouldn't have guessed to set the SHELL environment variable on Windows. It doesn't seem to be obvious to end-users that we wouldn't have duplicated login(1)'s job in setting SHELL from the passwd database.


2006-05-09 06:18:04 +0100 / mad / revision 1081

src/terminator/view/JTerminalPane.java: Lose responsibility for selecting the default shell...

bin/terminator: ... to somewhere that we can test whether /bin/bash is executable on Cygwin. We can't do that directly from the Java because "/bin" only has meaning to Cygwin, not to Windows-native code like the JVM.

This change means that we're setting an environment variable in a Cygwin application (rubyw.exe) and relying on being able to read it from a Windows-native DLL (jvm.dll) in another Cygwin application (launcherw.exe). This wouldn't work but for synchronizeWindowsEnvironment - the problem we previously had with $HOME. That code looks quite dubious and the next version of Cygwin will obsolete it (although we won't necessarily want to remove it immediately). So this change might have increased our fragility. It'll be useful to know that it's broken, rather than masking the problem, as we previously did.

This gives us a better Cygwin out-of-the-box experience. Cygwin users are used to clicking on a shortcut to Cygwin.bat, which runs bash --login -i. When run as bash, the shell gives you a different default prompt than if run, as we were running it before, as sh. The "posix" flag (which is what running it as sh sets) interacts with the "vi" line-editing mode flag to disable tab completion, as discovered by Chris Oklota.

On other platforms, SHELL is probably already set, usually to /bin/bash, and this change should have no functional effect. If it isn't set, we might run bash where before we ran sh.


2006-05-08 19:26:15 +0100 / mad / revision 1080

www/index.html: Be more consistent about use of "Windows" versus "Win32". One day we may well have to disambiguate between Win32 and Win64 but, at the moment, all our comments will apply to both. Move the link to the information on setting up (and justifying our use of) Cygwin to the section on running Terminator, rather than hiding them in the section on building it. Remove the runt paragraph on setting JDK_HOME which, these days, simply explains that, duh, we do the right thing automatically.


2006-05-08 19:11:22 +0100 / mad / revision 1079

www/index.html: Try to sound less stupid while increasing clarity in the regrettably complicated Windows problems section.


2006-05-08 19:07:17 +0100 / mad / revision 1078

www/index.html: Capitalize Terminator where definitely, currently appropriate: where it's a proper noun.


2006-05-08 07:12:01 +0100 / enh / revision 1077

lib/terminator.icns:
lib/Terminator.icns: fix the capitalization of the Mac OS ".icns" file; I had, of course, to do this on Linux.


2006-05-06 22:13:44 +0100 / enh / revision 1076

src/terminator/TerminatorFrame.java: pull the JTabbedPane code out...

src/terminator/TerminatorTabbedPane.java: ...into our own custom tabbed pane, which also provides custom tool tips.

src/terminator/view/JTerminalPane.java: we need access to getTerminatorFrame from outside this class now.


2006-05-06 01:11:13 +0100 / mad / revision 1075

native/all/pty/terminator_terminal_PtyProcess.cpp: We could even afford my writing the comment in English.


2006-05-06 01:08:36 +0100 / mad / revision 1074

native/all/pty/terminator_terminal_PtyProcess.cpp: Extra debugging output confirms that Elliott's original thought was right and that my ioctl-blocking hypothesis was wrong:

sleeping in child [
selecting in parent [
] selecting in parent
2006-05-05T17:02:40.824-0700 Terminator: Created PtyProcess[processId=1647,fd=30,pty="/dev/pts/3"]
ioctl in parent [
] ioctl in parent
(big gap)
] sleeping in child

Fix the comment. We can be extravagant with the comment here - this took long enough to track down and this new finding makes me wonder whether we'll be back here, for another platform, on another day.


2006-05-05 19:29:39 +0100 / mad / revision 1073

TODO: I don't have any implementation plan but programmatically colored backgrounds does seem a popular request.


2006-05-04 23:31:45 +0100 / enh / revision 1072

src/terminator/terminal/TerminalControl.java: I deliberately missed the space out between the process id and the pty name (by analogy with the list of processes we show using a pty) but it was a mistake to do so because it looks ugly, and it looks like a bug.


2006-05-04 23:13:52 +0100 / enh / revision 1071

native/all/pty/terminator_terminal_PtyProcess.cpp: Thomas Duffey has been reporting for some time that if he runs vim(1) in the third or fourth tab in a window on Mac OS, its idea of the terminal size is wrong. We'd been unable to reproduce it and hadn't got very far. Today, Simon Pamies reported the same problem in almost exactly the same words, but in a way that made Martin Dorey wonder about how to write a test program and then have the idea of inserting a call to sleep(3) in "PtyGenerator.h" to see if we could trigger the problem. We could, and it turned out to be that if we caused the child to sleep before opening the pty, instead of the TIOCSWINSZ ioctl blocking as it does on Linux, Mac OS seems to throw the window size information away.

We talked about a variety of solutions. We didn't like the idea of a separate pipe to communicate between parent and child (used by some of the competition) because it seems unnecessary; we didn't like the idea of using the traffic that will eventually come from the child because a quiet child could cause us to block far longer than necessary; we didn't like the idea of having the child write something for its parent before calling execvp(3) because it requires extra code in both parent and child. We settled on the idea of using select(2) to recognize when the child was ready (on both Linux and Mac OS, writes – as opposed to ioctls – block if the child hasn't opened the pty). This requires relatively little code, and only in the parent, because it synchronizes on something that the child has to do anyway. This doesn't appear to have had any negative effect on Cygwin, Linux, or Mac OS, and has fixed our artificially-induced problem on Mac OS.


2006-05-04 07:19:47 +0100 / enh / revision 1070

TODO: remove a done job.


2006-05-04 07:16:53 +0100 / enh / revision 1069

lib/terminator.desktop: the convention seems to be that absolute paths are only given when launching via gksudo(1). Also add a comment for people who aren't sure what "Terminator" is.


2006-05-04 03:48:06 +0100 / enh / revision 1068

native/all/pty/PtyGenerator.h: I've wondered for some time whether we should set $COLORTERM. I still don't have a strong reason to do so, but Google abounds with claims of applications that use it to test whether they're running on a color terminal, and most of the competition sets it, so let's join in.


2006-05-04 03:17:07 +0100 / enh / revision 1067

src/terminator/view/JTerminalPane.java: fix the existing control-tab and control-shift-tab behavior (the former worked, the latter didn't), and add support for alt/command-<number> to jump straight to a given tab (counting from 1).

src/terminator/TerminatorFrame.java: make it possible to select a given tab index programmatically.


2006-05-04 02:02:03 +0100 / enh / revision 1066

src/terminator/view/JTerminalPane.java: fix the workaround for Sun bug 6320676 to work for all ASCII control characters, not just the ones I've needed so far. This time I needed ^\ though I'm still not sure why I didn't do the right thing from the start.


2006-05-03 23:24:04 +0100 / mad / revision 1065

src/terminator/terminal/TerminalControl.java: Make the Writer thread name more useful and the Listener thread name somewhat more consistent. Only "somewhat" because the Executor stuff appends "-thread-1" to the Writer's name.

Despite the executor being created as soon as we could safely use it, the thread is only created when we do use it. That confused me for a while.


2006-05-03 22:56:29 +0100 / mad / revision 1064

src/terminator/terminal/TerminalControl.java: Elliott's long wondered why this hasn't got us into trouble. I did mkfifo pipe; cat > pipe and pasted more than 4KiB in. All terminals in that Terminator process then locked up to input. So we've just been living on borrowed time.

This is the minimal change to fix it, which leaves us with a sucky thread name. I see we give the equivalent thread on the reader side a better name already:

thread = new Thread(new TerminalRunnable(), "Process " + ptyProcess.getProcessId() + "(" + ptyProcess.getPtyName() + ") Listener");

Although why we call it a Listener when it calls "read", I don't know.


2006-05-03 22:29:37 +0100 / mad / revision 1063

src/terminator/terminal/TerminalControl.java: Andy Giddings gets the advantages of UTF-8 but still has a plausible-sounding argument for needing Cp1252 support. This change will make it marginally easier for him to hack the source by removing a little duplication and signposting the change he'd need to make.


2006-05-03 20:00:46 +0100 / mad / revision 1062

src/terminator/view/JTerminalPane.java: Fix the presumed warning on Mac OS by making the heuristic more complicated.


2006-05-03 16:52:09 +0100 / enh / revision 1061

src/terminator/view/JTerminalPane.java: the day we're posted to a Mac news site, the esc key is broken on Mac OS, causing us to be lynched by angry vi(1) users. I'm not sure this is the best fix for our current key-handling situation, but it will mean that today's Mac OS build is good.


2006-05-01 04:36:11 +0100 / enh / revision 1060

lib/terminator.desktop: a GNOME ".desktop" file for Terminator. This gets us next to gnome-terminal in the user's Applications menu.


2006-04-28 23:35:23 +0100 / mad / revision 1059

TODO: Our native Ruby on Windows experience isn't worth mentioning on a web page yet, but it'd be better off here than disappearing down my Inbox.


2006-04-28 12:16:56 +0100 / mad / revision 1058

www/index.html: Not having a working less(1) would be inconvenient. It'd be silly to lose a user for the sake of documenting such an easy remedy.

http://www.cygwin.com/ml/cygwin/2005-08/msg01031.html remains unanswered.


2006-04-28 10:26:10 +0100 / mad / revision 1057

bin/terminator: The compiled terminfo has moved under .generated, where it belongs, now it's automatically generated.


2006-04-28 10:03:20 +0100 / mad / revision 1056

native/Cygwin/WiX/terminator.wxs: terminator.wxs has moved to salma-hayek/lib/installer.wxs...

native/Cygwin/WiX: ... removing the reason for this directory.

native/Cygwin/WiX/terminator.ico:
lib/terminator.ico: Move the .ico alongside the .png files it was created from, now there's now WiX directory for it to live in.

www/index.html: The native-dist rule has changed to remove the spurious -Cygwin in the uploaded installer name, for consistency with the old app-dist rule.


2006-04-28 08:27:43 +0100 / enh / revision 1055

src/terminator/terminal/TerminalControl.java: log the creation of processes as well. Don't capitalize the name of methods in log messages.

src/terminator/terminal/PtyProcess.java: reduce the verbosity of PtyProcess.toString, hopefully making it clearer without losing anything valuable.


2006-04-28 06:35:36 +0100 / mad / revision 1054

bin/terminator: FIXME fixed.


2006-04-28 06:28:38 +0100 / mad / revision 1053

lib/terminfo/terminator: The compiled version of the terminfo that was checked-in was ancient. I don't think we need a checked-in copy, though I get "The procedure entry point _nc_trim_sgr0 could not be located in the dynamic link library cygncurses-8.dll" on Cygwin. There was no reason given in the history for the unconventional decision to check in a generated file.


2006-04-28 04:20:52 +0100 / mad / revision 1052

bin/terminator: "for local administrators" isn't as strong as "host-specific", which is the actual (FHS) condition. "FHS" is a stronger condition than "Debian" (whose Policy Manual demands compliance with the FHS). That explains why /usr/share/terminfo/ is a sensible default choice on other Unixes.


2006-04-28 03:39:41 +0100 / mad / revision 1051

bin/terminator: If we're going to use this C-style File cruft, we should use it consistently. At least it's one step up from the bash-style ?w nonsense. Likewise, if directory names end in /, they should all end in /.


2006-04-28 03:18:53 +0100 / enh / revision 1050

bin/terminator: replace the non-obvious Pathname magic with the more obvious File.join (in the process removing the unchecked dependency on the run-time type of install_terminfo_in's directory argument). Re-order the code to separate the system-wide installation from the user's home installation. Elaborate a few comments. Improve a name to carry more type information, since we can't statically check and I keep confusing myself. Fix a find/replace over-generalization.


2006-04-28 01:09:56 +0100 / enh / revision 1049

src/terminator/view/JTerminalPane.java: clarify a warning and a comment, and fix an incorrect comment.


2006-04-28 00:30:49 +0100 / mad / revision 1048

src/terminator/view/JTerminalPane.java: Document the advantages of keyTyped, to make it clearer that it does have some, rather than just the pitfall I just tried to prevent us falling into again.


2006-04-28 00:06:51 +0100 / mad / revision 1047

src/terminator/view/JTerminalPane.java: Not understanding the non-obvious constraint wasted a good few hours of my time on the occasion when I added the comment. Now it turns out that, despite the comment, we've been sending two Ascii.ESC for every VK_ESCAPE key press for years. This heuristic would have caught both.


2006-04-27 23:17:10 +0100 / enh / revision 1046

src/terminator/view/JTerminalPane.java: stuartb complained that he was seeing the visual bell too often. Specifically:

  In vi, already in command mode, hit escape - I see two "bells" in terminator, one in xterm.
  In insert mode, hit escape - one bell in terminator, none in xterm.

  At bash command line, hit escape twice [quickly] - both terminator and xterm say "Display all <x> possibilities? (y or n)", but only terminator bells.

I wondered if it was the work-around for Sun bug 6320676 causing a problem on Java 5, but I can repeat the problem with Java 6 too. Don't doubt Mr Bell! Two lines after a comment saying "don't handle keys that generate KEY_TYPED events", we were handling VK_ESCAPE, which generates a KEY_TYPED event. Stop doing that, and the Escape key works as it should.


2006-04-27 19:38:22 +0100 / mad / revision 1045

bin/terminator: Try to eliminate any future missing / problems by passing filenames using Pathname. Collapse /usr/share/terminfo duplication because that choice needs a comment and perhaps some more code.


2006-04-27 19:10:01 +0100 / mad / revision 1044

bin/terminator: This is the smallest change to stop the script from installing /usr/share/terminfo/tterminator. I think we'd be better off using Pathname and its hateful overloading of the + operator.


2006-04-27 17:48:38 +0100 / enh / revision 1043

bin/terminator: install our terminfo if it's newer than the existing copy. Also preserve times when copying so that the parent directory will show when we installed our terminfo but the file itself will show when it was compiled. (I hate "uptodate?" with its strange Engrish name and hard-to-guess behavior.)


2006-04-27 17:30:56 +0100 / enh / revision 1042

bin/terminator: remove two unnecessary uses of Kernel#system.


2006-04-27 06:33:33 +0100 / enh / revision 1041

bin/terminator: a few steps towards fixing our terminfo mess. We still need the makerule that does the compilation, and there are a couple of FIXME comments here, but this is the first progress we've made in months, despite both the need and the solution being obvious.


2006-04-26 06:35:38 +0100 / mad / revision 1040

bin/terminator: A variable isn't as local as it could be. That looks like a mistake. I suspect this comment should be code, somehow.


2006-04-26 06:34:06 +0100 / mad / revision 1039

bin/terminator: We need to show InAppClient the rabbit regardless of whether we're DEBUGGING_TERMINATOR etc, if the .secret file is to remain an unreadable secret. I didn't want to broaden the already large scope of the very general "rescue" clause, so I shunted it into InAppClient itself.


2006-04-26 05:56:35 +0100 / mad / revision 1038

bin/terminator: A fuller explanation of the non-obvious overriding of the InAppServer host.


2006-04-26 05:51:03 +0100 / mad / revision 1037

bin/terminator: Back-out the FIFO code and lose the socket code to salma-hayek. Tidy-up some variable names and placement a little.


2006-04-26 00:05:49 +0100 / mad / revision 1036

bin/terminator: Phil complains about the magic-looking syntax. Fair does: I'm not a fan of one character variable names and I am a fan of using the name "spade" for a variable of type Spade.


2006-04-26 00:03:54 +0100 / mad / revision 1035

bin/terminator: Abstract-out two of the differences between the Edit and Terminator versions.


2006-04-25 23:59:04 +0100 / mad / revision 1034

bin/terminator: I think this is the only other instance of missing parentheses on a method invocation.


2006-04-25 23:57:32 +0100 / mad / revision 1033

bin/terminator: Another one-thing-per-line change.


2006-04-25 23:56:41 +0100 / mad / revision 1032

bin/terminator: Fix spelling mistake, remove spurious flushes, remove the need for explicit closing and the bogus references to Edit by rewriting file i/o in the preferred idiom.


2006-04-25 23:52:59 +0100 / mad / revision 1031

bin/terminator: Say one thing per line for a better history. The second of these lines is missing from the copy of this code in Edit.


2006-04-25 23:51:19 +0100 / mad / revision 1030

bin/terminator: Remove one seemingly spurious difference between the two copies of this code. We should not be removing files we didn't create.


2006-04-25 23:50:16 +0100 / mad / revision 1029

bin/terminator: Reinstate the subtle difference between Terminator and Edit, and the comment which didn't signpost it very clearly, which Phil threw away in his copy-and-paste frenzy.


2006-04-25 22:30:41 +0100 / pcn / revision 1028

bin/terminator: Changes to follow the change to InAppServer. We now need to check what kind of InAppServer is running (FIFO-based or Socket-based), and do the sensible thing.


2006-04-25 05:24:53 +0100 / enh / revision 1027

src/terminator/view/JTerminalPane.java: the work-around for Sun bug 6320676 in Java 6 broke control-[ (ASCII ESC) and control-] (the telnet(1) escape character), both of which it's sometimes necessary to type.


2006-04-17 00:02:43 +0100 / pcn / revision 1026

src/terminator/view/highlight/SelectionHighlighter.java: Borrowing heavily from PTextArea's implementation of mouse selection, re-implement Terminator's selection code in a better way. Double- and triple-click drags will now select and deselect in multiples of words or lines.

It's rather unfortunate there's no easy way of moving this code into something which can be used by both PTA and Terminator. The principle is shared, but the interface to the underlying selectable thing would be so large (particularly for the PTA version) that I can't see it as being worthwhile.

TODO: Remove done job.


2006-04-16 22:39:43 +0100 / mad / revision 1025

src/terminator/view/JTextBuffer.java: Fix a problem with small windows which I can trivially reproduce on Linux but which seemingly doesn't happen on Mac OS. We should perhaps catch this earlier - say in TextBuffer.setSize - and so prevent invalid model sizes from being set, rather than trying to cope with the fall-out. I don't think that would be quite enough to stop the cursor from being positioned at an invalid location.

2006-04-16T13:18:26.688-0700 Terminator: Failed to notify PtyProcess[processId=13451,fd=30,pty="/dev/pts/5",didDumpCore=false,didExitNormally=false,wasSignaled=false,exitValue=0] of size change
Associated exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1762)
at terminator.view.JTextBuffer.modelToView(JTextBuffer.java:397)
at terminator.view.JTextBuffer.redrawCursorPosition(JTextBuffer.java:631)
at terminator.view.JTextBuffer.setCursorPosition(JTextBuffer.java:337)
at terminator.model.TextBuffer.processActions(TextBuffer.java:330)
at terminator.terminal.TerminalControl.sizeChanged(TerminalControl.java:228)
at terminator.view.JTerminalPane$1SizeMonitor.componentResized(JTerminalPane.java:179)
at java.awt.Component.processComponentEvent(Component.java:5314)
at java.awt.Component.processEvent(Component.java:5268)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at e.debug.EventDispatchThreadHangMonitor.dispatchEvent(EventDispatchThreadHangMonitor.java:192)
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)


2006-04-16 21:50:00 +0100 / mad / revision 1024

src/terminator/view/JTextBuffer.java: Clear the bird view when the scroll-back is cleared. I didn't see any other cases in the source where a lineHighlight was cleared without the birdView receiving some corresponding action.


2006-04-16 01:27:12 +0100 / mad / revision 1023

src/terminator/view/JTerminalPane.java: Enable the bird view as, with my change to salma-hayek's BirdView.java, it now works for me.


2006-04-15 23:41:49 +0100 / pcn / revision 1022

src/terminator/view/FindBirdsEye.java: An implementation of a bird's eye, which watches the find highlights in a terminal window.

src/terminator/view/JTextBuffer.java: Keep the bird view and eye up to date with 'find' highlights. Not a beautiful mechanism, the 'instanceof' stuff, but it's simple and explicit.

src/terminator/view/JTerminalPane.java: Set up the bird view for each JTextBuffer, but don't quite add it yet until I've found a way around that annoying zero-vertical-size problem.


2006-04-09 19:20:35 +0100 / enh / revision 1021

src/terminator/view/JTerminalPane.java: SimpleDialog now generates the HTML for us. Also, "Terminate" was an inaccurate verb for the action button; "Close" is closer to the truth.

src/terminator/Terminator.java: improve what's basically a debugging message until Apple fix their launcher so that we get these events.


2006-04-09 02:10:57 +0100 / enh / revision 1020

www/index.html: include the new footer.


2006-04-05 01:17:20 +0100 / mad / revision 1019

native/Cygwin/WiX/terminator.wxs: The makefile can supply all the terminator-specific strings. The salma-hayek MergeRef guid in here needs to stay (it's the equivalent of terminator's UPGRADE_GUID) but this file can now be shared with Edit or whatever. So it'll want moving to salma-hayek, which will hide the history. Bonanza.


2006-04-05 01:06:45 +0100 / mad / revision 1018

Makefile: The upgrade guid needs to be shared across all versions of terminator, regardless of which machine builds the installer. We could provide a mechanism for generating it automatically, if it were absent, but it'd need checking-in anyway. I think that's the only part of terminator.wxs which really needs to be terminator-specific.


2006-04-04 21:53:01 +0100 / mad / revision 1017

bin/terminator: Consistency with immediately preceding salma-hayek check-in.


2006-04-01 22:26:16 +0100 / mad / revision 1016

bin/terminator: I reviewed part of the change in CheckInTool, went back to Edit to polish the comment, then forgot that I hadn't looked at the whole change.


2006-04-01 09:34:51 +0100 / mad / revision 1015

bin/terminator: Update the user.home/$HOME comment in the light of the launcher change I just committed. We could choose a different approach but I'm not sure the one we're using is wrong. (I haven't really thought about it.)


2006-03-31 05:41:20 +0100 / mad / revision 1014

native/Cygwin/WiX/terminator.wxs: Brian Hobbs hides his Cygwin installation in C:\dev\cygwin. I'd catered to the possibility (well I think I had) that someone might have it on a different drive than C: but, as usual, it wasn't clear how to do better than that. I'm a bit suspicious of how easily this worked - this is only the second version I tried to compile and it went straight through Orca's validation and appeared to install first time. I'm not sure how long Cygwin have stored their / mount in this registry key, how long they will continue to store it there or, indeed, whether they do at the moment - or whether it's just litter in my Registry.


2006-03-30 10:01:10 +0100 / mad / revision 1013

www/index.html: 728 000 versus 518 000 google hits. A cosmetic change to test post-migration commit.


2006-03-22 16:59:24 +0000 / mad / revision 1012

src/terminator/Options.java: chrisa's terminator wouldn't start today and he was baffled:

~ $ terminator -xrm 'XTerm*initialColumnCount:132' -xrm 'XTerm*initialRowCount:40'
2006-03-21T13:53:53.218+0000 Terminator: Application started.
2006-03-21T13:53:53.219+0000 Terminator: Java 1.5.0_06 (1.5.0_06-b05).
2006-03-21T13:53:53.219+0000 Terminator: Linux 2.6.15-1-686-smp (i386).
2006-03-21T13:53:53.482+0000 Terminator: Couldn't start Terminator.
Associated exception:
java.lang.RuntimeException: Attempt to set unknown resource "XTerm*initialColumnCount"
        at terminator.Options.processResourceString(Options.java:614)
        at terminator.Options.parseCommandLine(Options.java:244)
        at terminator.Terminator.parseCommandLine(Terminator.java:86)
        at terminator.Terminator.parseOriginalCommandLine(Terminator.java:97)
        at terminator.Terminator.access$200(Terminator.java:13)
        at terminator.Terminator$3.run(Terminator.java:186)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at e.debug.EventDispatchThreadHangMonitor.dispatchEvent(EventDispatchThread
HangMonitor.java:170)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea
d.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)
~ $

If he had followed the suggestion I'm adding here, he'd have at least had a hint that he should try using resources of class Terminator rather than XTerm. The help also ends in a message explaining that .Xdefaults and .Xresources aren't read - which may also have caused him difficulties.


2006-03-22 06:28:19 +0000 / enh / revision 1011

src/terminator/Options.java: the GTK and Metal LAFs don't use a DefaultListCellRenderer to render their combo boxes, so we need to delegate to whatever they do use rather than subclass DefaultListCellRenderer if we want to have a custom combo box renderer that looks right. (Doing this won't harm the other LAFs.)


2006-03-21 08:21:30 +0000 / enh / revision 1010

src/terminator/view/JTerminalPane.java: behave correctly even if the user has some windows with menu bars and some without. I don't know why I'm encouraging them.


2006-03-21 08:12:27 +0000 / enh / revision 1009

src/terminator/FindDialog.java: ensure that only one find dialog is shown at once. Before this change, bringing up the find dialog while it was already up would result in two dialogs, only one of which – the newer – would work because the JTextField would be added to it.


2006-03-21 06:15:45 +0000 / mad / revision 1008

src/terminator/model/TextBuffer.java: Why would we want to insert a line when we move to the last existing line? Surely we only want to insert if we move one down from there. This fixes readline editing near the start of a once-wrapped line at the bottom of the window (so a line between 81 and 160 characters in a default-sized terminal). Previously, the part of the wrapped line on the last line of the window would get cleared.

Although I'm not very confident in it, this change doesn't break scrolling down in vim for me, even in the split-screen :help mode. My first attempt changed the condition from being on the scroll index to being on the size of textLines and that broke vim.

All these months suffering that. I hadn't realized that it was our fault.


2006-03-21 04:19:36 +0000 / mad / revision 1007

src/terminator/model/TextBuffer.java: Mimic the behavior of gnome-terminal on /bin/echo -e '\x1b[10Ahello' and /bin/echo -e '\x1b[10Bhello' with and without scroll-back. In both directions, the motion is constrained by the visible area.

This fixes:

2006-03-20T18:36:41.2-0800 Terminator: Couldn't flush terminal actions for PtyProcess[processId=7513,fd=31,pty="/dev/pts/2",didDumpCore=false,didExitNormally=false,wasSignaled=false,exitValue=0]
Associated exception:
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:851)
at terminator.terminal.TerminalControl.flushTerminalActions(TerminalControl.java:249)
at terminator.terminal.TerminalControl.processBuffer(TerminalControl.java:238)
at terminator.terminal.TerminalControl.access$200(TerminalControl.java:22)
at terminator.terminal.TerminalControl$TerminalRunnable.run(TerminalControl.java:113)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.get(ArrayList.java:323)
at terminator.model.TextBuffer.getTextLine(TextBuffer.java:400)
at terminator.model.TextBuffer.processLine(TextBuffer.java:440)
at terminator.terminal.TerminalControl$PlainTextAction.perform(TerminalControl.java:325)
at terminator.model.TextBuffer.processActions(TextBuffer.java:317)
at terminator.terminal.TerminalControl$2.run(TerminalControl.java:251)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at e.debug.EventDispatchThreadHangMonitor.dispatchEvent(EventDispatchThreadHangMonitor.java:170)
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)

And consequent problems if you type a line (in bash) long enough to wrap, clear the scroll-back (Alt-K) while at the end of the line and ask bash to move to the beginning of the line (Ctrl-A for me).

I did make some effort to test it for +-1 bugs. Surely it can't be right when textLines.empty()? This change is consistent with getLocationWithinBounds in that regard. Perhaps I should be using getLocationWithinBounds. I think constrainLocationTo(Visible)Bounds would be a better name. From the look of the source, I'd guess that the existing caller of that method wants constraining to the visible bounds, not just the buffer bounds, and I think it wants constraining on the top-left sides as well as the bottom-right.


2006-03-20 23:01:38 +0000 / mad / revision 1006

TODO: I can never remember "socat" when I want it. It'd be worth writing up for the web page. Elliott suggests that we'll look like stoners if we write it up before trying it. So I'll add it to TODO, the home of half-baked ideas.

The last person that I remember wanting a serial back-end (simonj) was really wanting to replace Windows' default-installed HyperTerminal but hadn't (and, afaik, still hasn't) found anything else with the same quality of progress reporting. That's not something which ought to be part of terminator (like telnet and ssh) but it would be eminently reasonable to recommend another program on the terminator web page.


2006-03-18 20:23:25 +0000 / enh / revision 1005

src/terminator/Options.java: provide a preview of the selected font in the preferences dialog.


2006-03-18 19:32:22 +0000 / enh / revision 1004

src/terminator/Options.java: simplify the preferences classes by rewriting them all in the style of ColorPreference.


2006-03-17 08:15:27 +0000 / enh / revision 1003

src/terminator/terminal/TerminalControl.java: don't set processIsRunning until the process is actually running. Don't bother throwing an exception trying to start a thread to read from a process that never started.


2006-03-17 08:12:21 +0000 / enh / revision 1002

src/terminator/Options.java: fix up the insets on buttons. This doesn't quite fix Mac OS' problem; I think I might have found my hundredth Aqua LAF bug. But it looks sweet with the Metal LAF or Java 6's GTK+ LAF, and doesn't make Mac OS any worse.


2006-03-17 02:34:21 +0000 / enh / revision 1001

www/index.html:
www/win32-tabs.png: proper alt attributes, corrected alphabetical ordering, and a new screenshot that shows both multiple tabs and Win32 support.

TODO: jobs avoided.


2006-03-17 01:50:19 +0000 / mad / revision 1000

src/terminator/Terminator.java: The old implementation of --version was certainly "no use" - it didn't actually tell you anything about the version, save the year from the copyright message. Stuart ran terminator --version today, so I don't think the idea is "no use" but, if we're not going to implement it, we shouldn't advertise it.


2006-03-16 17:50:24 +0000 / mad / revision 999

src/terminator/Options.java: Fix terminator --help to show even the defaulted options (as it used to).

src/terminator/Terminator.java: We could perhaps just remove this line but, if people see X11-style resources, they might try to add them to their .Xresources or .Xdefaults. Especially if they've used an older version of terminator which parsed those files.


2006-03-16 07:33:58 +0000 / enh / revision 998

src/terminator/Options.java: add the ability to edit color preferences. Ditch the automatic reading of .Xdefaults and .Xresources. Remove the unused "linkColor".

www/index.html: remove now-unnecessary documentation.


2006-03-15 20:28:51 +0000 / enh / revision 997

src/terminator/view/CursorBlinker.java: simonj appears to be able to reproduce the CursorBlinker problem I've long assumed (it used a repeating javax.swing.Timer), so switch to an e.gui.RepeatingComponentTimer to ensure the timer gets stopped.

src/terminator/TerminatorFrame.java: remove the debugging output that confirmed my suspicion.


2006-03-15 19:25:28 +0000 / mad / revision 996

src/terminator/TerminatorFrame.java: simonj's having a problem with runtitan titannet1 --connect not terminating when he closes the three-tabbed window. It doesn't happen for me. The jstack output doesn't indicate any obvious (to me) deadlock. Elliott suggests this magic incantation. I'm not sure what the downside is. I guess there must be one, or this would already be checked-in.


2006-03-15 19:19:42 +0000 / mad / revision 995

src/terminator/TerminatorFrame.java: By the time the invokeLater Runnable is run, tabbedPane may have been set to null by switchToSinglePane. This happens to me (and simonj) if I click the close window icon on a shell window with a handful of tabs. The null pointer exception shouldn't have stopped anything but the no longer useful requestFocus call. We don't want to pollute the log, though, with harmless exceptions. I don't know if the selected component can ever be null in practice but the javadoc suggests that it might be.


2006-03-14 07:52:35 +0000 / enh / revision 994

src/terminator/terminal/TerminalControl.java: give all the reader threads distinctive names, just in case.


2006-03-14 07:30:11 +0000 / enh / revision 993

src/terminator/terminal/PtyProcess.java:
src/terminator/terminal/TerminalControl.java:
src/terminator/view/JTerminalPane.java: when reporting errors, say which PtyProcess the error corresponds to.

src/terminator/Options.java: add missing quotes around a filename in a log message.


2006-03-13 03:27:22 +0000 / enh / revision 992

TODO: jobs done.


2006-03-13 02:48:01 +0000 / enh / revision 991

src/terminator/TerminatorMenuBar.java: make the preferences dialog available on all platforms (it was already available on Mac OS).


2006-03-13 02:44:15 +0000 / enh / revision 990

src/terminator/Options.java:
src/terminator/Terminator.java: although the Mac OS version of Terminator has long had a "Preferences..." menu item, the changes made in the dialog haven't persisted. This patch writes them to "~/.terminator-settings" and reads them back in at start-up.


2006-03-13 02:41:28 +0000 / enh / revision 989

src/terminator/TerminatorMenuBar.java: lose Apple-specific functionality to FormBuilder, where it can apply to all forms.


2006-03-11 21:51:16 +0000 / enh / revision 988

src/terminator/BorderPanel.java: dump BorderPanel...

src/terminator/view/JTerminalPane.java: ...in favor of a LineBorder as the JScrollPane's viewport border, which gives the border behavior we actually want (car reported this broken a long time ago, but it wasn't really noticeable unless you increased the border thickness from the default 2 pixels).

src/terminator/view/JTextBuffer.java: now JTextBuffer has to implement Scrollable itself, which is probably the right idea anyway.

TODO: a couple of notes.


2006-03-11 20:21:47 +0000 / enh / revision 987

www/index.html: fix "as as".


2006-03-11 06:32:43 +0000 / enh / revision 986

www/index.html: fix typo.


2006-03-11 06:29:09 +0000 / enh / revision 985

www/index.html: make it clear that we distribute a universal binary version of Terminator.


2006-03-09 07:33:09 +0000 / enh / revision 984

www/index.html: a clarification and a correction brought to our attention by JennyW.


2006-03-08 04:38:52 +0000 / enh / revision 983

native/all/pty/terminator_terminal_PtyProcess.cpp:
src/terminator/terminal/PtyProcess.java: fix the latent EINTR problems in the custom stream implementation we were previously using only on Cygwin, and switch to always using that mechanism (rather than injecting our own file descriptor into an instance of FileDescriptor).


2006-03-06 00:54:01 +0000 / enh / revision 982

src/terminator/view/JTextBuffer.java: make the JTextBuffer opaque so the background doesn't show through on Mac OS.

src/terminator/TerminatorFrame.java: work-around the fact that Mac OS' JTabbedPane relies on transparency by switching the frame background between the desired terminal background when there's no tabbed pane and the default panel background when there is. This reduces flashing where possible.

Also simplify the way terminals are initially added: there's no reason to distinguish this case from the case of adding terminals later.


2006-03-05 02:05:34 +0000 / enh / revision 981

src/terminator/InfoDialog.java: keep the info dialog working even if our JNI side failed to start.


2006-03-05 01:39:45 +0000 / enh / revision 980

src/terminator/InfoDialog.java:
src/terminator/terminal/PtyProcess.java: show the pseudo-terminal device filename in the info dialog.


2006-03-05 01:29:32 +0000 / enh / revision 979

native/all/pty/terminator_terminal_PtyProcess.cpp: remove an unnecessary temporary.

native/all/pty/PtyGenerator.h: without this change, I can trivially reproduce the Mac OS SIGHUP problem as follows:

  1. start Terminator.
  2. open a bunch of windows (20, say).
  3. close them all with ^d.
  4. open a new Terminal window.
  5. go back to Terminator and open windows until a whole bunch all get
  SIGHUP at once (it took me 16 new windows just, though i'm sure it's
  usually less; sometimes the first window will get SIGHUP).

  the problem always seems to show itself in the log as a bad file
  descriptor either from FileInputStream.readBytes or the TIOCSWINSZ
  ioctl(2) in PtyProcess.sendResizeNotification.


2006-03-04 23:55:14 +0000 / enh / revision 978

src/terminator/Frames.java:
src/terminator/TerminatorFrame.java: fix a problem on Mac OS where the hidden frame we use to help implement the proper behavior when no real windows are open wasn't being hidden. Also fix the bug that tipped me off to that bug, which is that the hidden frame was actually becoming visible to the user, rather than just to the windowing system.


2006-02-28 07:24:47 +0000 / enh / revision 977

src/terminator/Terminator.java:
src/terminator/TerminatorMenuBar.java: use the new GuiUtilities.setDefaultKeyStrokeModifier rather than messing with alternative modifiers ourselves. This fixes pcn's complaint that WindowMenu was using the control key for "Minimize" on Linux even in Terminator (where all other menu items were using alt).


2006-02-28 00:28:54 +0000 / enh / revision 976

native/all/pty/terminator_terminal_PtyProcess.cpp: waitpid(2) can return -1 with errno set to EINTR, in which case we should retry.

src/terminator/terminal/TerminalControl.java: ensure that a real waitpid(2) failure is reported in the corresponding window, rather than lost on the JNI code's std::cerr.


2006-02-25 22:40:23 +0000 / enh / revision 975

native/all/pty/PtyGenerator.h: openSlaveAndCloseMaster doesn't need to be public. closeUnusedFiles can be simplified by running it before we open the slave and close the master. The comment for the TIOCSCTTY ioctl was completely wrong; add new comments to that code taken from man pages. Use the preferred idiom for checking Unix return values of comparing against -1, because that's the exact error return specified.

native/all/pty/terminator_terminal_PtyProcess.cpp:
src/terminator/terminal/PtyProcess.java:
src/terminator/terminal/TerminalControl.java: extra debugging output while we're having failures we don't understand on Mac OS.


2006-02-25 21:56:22 +0000 / enh / revision 974

src/terminator/Terminator.java: add missing @Override annotations, and add a currently useless handleOpenFile implementation. Apple's java(1) is broken; this only works with JavaApplicationStub. I haven't found out why, and haven't been able to persuade them to tell me. I've raised a bug, and the NetBeans guy is also interested.


2006-02-25 21:41:05 +0000 / enh / revision 973

src/terminator/view/JTerminalPane.java: the previous change looked wrong in the source because 80x24 isn't necessarily the default, caused excessive (incorrect) size change notification for tabbed terminals because it would report 80x24 each time the tab was selected, and caused exceptions like "java.io.IOException: ioctl(49, TIOCSWINSZ, &size) failed: (Bad file descriptor)" to be thrown when closing tabs. The basic idea of forcing a size check whenever we're shown was right, though.


2006-02-25 21:31:07 +0000 / enh / revision 972

src/terminator/Options.java: turn the menu bar on by default, but still don't remove the option for people to turn it off in their .Xdefaults.


2006-02-24 22:30:45 +0000 / pcn / revision 971

TODO: Job done, but not as perfectly as we'd like.


2006-02-24 22:26:33 +0000 / pcn / revision 970

src/terminator/view/highlight/SelectionHighlighter.java: Implement a nice simple way for the selection highlighter to remove the current selection, based on a region of text which has changed.

src/terminator/view/JTextBuffer.java: Add a method for getting at the selection highlighter, so that...

src/terminator/model/TextBuffer.java: ...the text buffer can notify it when a bunch of lines change.

This isn't perfect, in that editing text above the selection will cause the selection to be cleared, but getting it working properly would involve more work in the TextBuffer/TextLine area.


2006-02-24 21:46:50 +0000 / pcn / revision 969

src/terminator/view/JTerminalPane.java: If we start off at a size other than 80x24, we must force a size change notification to be propagated down to the child, since they'll assume the default 80x24 unless told otherwise.


2006-02-22 02:32:06 +0000 / enh / revision 968

native/all/pty/PtyGenerator.h: work around the absence of posix_openpt(3) on Cygwin.


2006-02-21 04:44:33 +0000 / enh / revision 967

native/all/pty/PtyGenerator.h: using fast user switching on Mac OS 10.4, I had Terminator fail to start children with errors like "open(/dev/ttyp6, O_RDWR | O_NOCTTY): (Permission denied)". That made me review our non-Linux code (where we don't have /dev/ptmx available) and find that – although we use grantpt(3), unlockpt(3), and ptsname(3) – we're failing to use the POSIX posix_openpt(3) which opens /dev/ptmx on systems that have it, or does the hard work for us on systems that don't. Since we're unlikely to have Java 5 on anything but a modern POSIX system, that sounds like a good deal. I haven't been able to repeat the problem since, but fear that may just because I don't understand the circumstances necessary for reproduction.


2006-02-19 05:41:35 +0000 / enh / revision 966

src/terminator/Terminator.java: car complains that we didn't update our quit behavior when we added the ability to discover what processes are running with access to a particular terminal. So rewrite handleQuit to be equivalent to the user hitting close on all their windows (possibly getting per-window confirmation dialogs), and only exit if there are no windows left open at the end.

src/terminator/TerminatorFrame.java: correct handling of window closing in Java continues to be difficult. WindowListener.windowClosed is wrong because it's only invoked when a window is disposed. WindowListener.windowClosing only applies to closes initiated by the window manager. ComponentListener.componentHidden, though unconventional and not well signposted in the documentation, would be the right choice if it weren't for the unfortunate problem that we're already running on the EDT. So anything such a listener would do would happen too late. Overriding setVisible, it seems, is the only correct alternative in this application (or any application that wants to integrate with Mac OS' standard quit mechanism?). To further complicate matters, setDefaultCloseOperation continues to be misleading, so comment it.

src/terminator/Frames.java: name the hidden frame for ease of debugging. Remove frames from our internal list before iterating over the list. Add a convenience method for copying the internal list (for safe concurrent iteration) because Collections.list is broken.


2006-02-18 02:20:29 +0000 / enh / revision 965

src/terminator/TerminatorFrame.java:
src/terminator/TerminatorMenuBar.java: simplify the next/previous tab implementation.

src/terminator/view/JTerminalPane.java: and add support for control-tab and control-shift-tab to cycle through the tabs. This, neilb told me, is what Firefox uses (I'd looked myself, but it's not mentioned on the menu, so I didn't find it).


2006-02-17 08:07:49 +0000 / enh / revision 964

src/terminator/TerminatorFrame.java: remove manual call to setLocationByPlatform now we set the analogous property in the startup script.


2006-02-16 23:11:24 +0000 / enh / revision 963

bin/terminator: fix typos in comments.


2006-02-16 23:00:59 +0000 / enh / revision 962

bin/terminator: use the variant of Kernel.system that takes multiple arguments to increase our chances of working if we ever meet pathnames containing spaces, and remove an out-of-date comment about a problem that could occur with a version of Ruby we no longer support.


2006-02-15 04:32:49 +0000 / mad / revision 961

bin/terminator: We're still taking two mentions of log_directory into the shower but at least we've lost the Cygwin specificity again.


2006-02-15 03:30:39 +0000 / enh / revision 960

src/terminator/Options.java: comment a known deficiency.


2006-02-15 03:30:02 +0000 / enh / revision 959

bin/terminator:
src/terminator/LogWriter.java: fix logging on Win32, where "user.home" isn't equal to $HOME (presumably to support roaming profiles and the like), and we can't access $HOME anyway. This puts all the knowledge about the log directory location in the script, so it's a good change for Unix too.


2006-02-14 22:13:21 +0000 / mad / revision 958

www/index.html: Lose the make help to salma-hayek where it's now output hopefully just before the point of failure.


2006-02-14 02:29:16 +0000 / enh / revision 957

src/terminator/LogWriter.java: cope with the case where the stream was never opened.


2006-02-13 19:59:58 +0000 / mad / revision 956

TODO: Record a direction I'm now convinced our terminfo should move in, with the reasons for doing it.


2006-02-13 03:41:50 +0000 / enh / revision 955

src/terminator/view/JTerminalPane.java: work around Sun bug 6320676, and correct code that was assuming that control is the only modifier key.


2006-02-13 02:15:10 +0000 / enh / revision 954

www/index.html: remove mention of a no-longer supported feature, and mention the new "safe quit" functionality instead.

www/linux-top.png: a new screenshot, this time taken on Ubuntu.


2006-02-12 23:32:59 +0000 / enh / revision 953

src/terminator/terminal/TerminalControl.java: car complained that recent Terminator builds have sometimes exited unexpectedly on Mac OS claiming that the child received SIGHUP. I don't know how to repeat it, but I have now seen it myself. Improve our logging in the hopes that we'll find a smoking gun when it happens again.


2006-02-12 23:24:50 +0000 / enh / revision 952

sigwinch-test.cpp: remove long-unused test code.


2006-02-12 23:23:37 +0000 / enh / revision 951

src/terminator/TerminatorMenuBar.java: ensure we don't have dialogs without menus on Mac OS.


2006-02-12 23:17:24 +0000 / enh / revision 950

src/terminator/Terminator.java:
src/terminator/TerminatorMenuBar.java: remove a silly scheme for finding a parent Frame that meant that "New Command" would often appear in the wrong place. I'd already written the code to do the right thing.


2006-02-12 23:09:11 +0000 / enh / revision 949

src/terminator/TerminatorFrame.java: finish GNOME startup in the normal case, where we've launched a new Terminator process.

bin/terminator: finish GNOME startup in the optimized case, where we've just passed on a "new shell" request.


2006-02-12 23:04:56 +0000 / enh / revision 948

src/terminator/TerminatorFrame.java: make an initialization clearer.


2006-02-12 18:56:03 +0000 / enh / revision 947

src/terminator/Terminator.java: make the Frames instance accessible, and stop notifying it of frames being added or removed.

src/terminator/TerminatorFrame.java: change each frame's WindowListener to notify the Frames instance of frames being added or removed, or their "iconified" (minimized) state changing.

src/terminator/Frames.java: scan the list of TerminatorFrame instances and make the hidden frame visible or invisible depending on whether there are any showing non-minimized frames. This fixes the following bug report from car:

  If I minimize my one and only terminator window the menu bar is bare
  except for "Terminator".  I can't use C-N to create a new window.  If
  I restore that one minimized window, the menu bar is populated as I'd
  expect.  If I have no terminator windows, the menu bar is populated
  as I'd expect.  If I have multiple terminator windows but all of them
  are minimized, the menu bar is bare again.


2006-02-12 05:52:40 +0000 / mad / revision 946

bin/terminator: Executables have moved into a bin directory.

native/Cygwin/WiX/terminator.wxs: And salma-hayek's WiX merge module is back where it started.


2006-02-12 05:38:39 +0000 / mad / revision 945

native/Cygwin/WiX/terminator.wxs: The salma-hayek installer module now has a shorter path...

bin/terminator: ... as does the launcher program. invoke-java.rb now takes care of the shared library path for us.


2006-02-11 01:50:14 +0000 / enh / revision 944

src/terminator/terminal/TerminalControl.java: go with a name change mad suggested.


2006-02-11 01:48:06 +0000 / enh / revision 943

src/terminator/LogWriter.java: ensure that LogWriter's internal state is consistent if we close the stream to avoid problems if we try to log output afterwards.


2006-02-11 00:43:41 +0000 / enh / revision 942

src/terminator/TerminatorMenuBar.java: every time I want to use the keyboard to move to the previous or next tab on Linux, it's broken. This time it's because we were trying to use the same keystroke as we already use for keyboard-driven scrolling, in some misguided attempt to have one pair of keystrokes compatible with gnome-terminal, even when every other keystroke is nothing like gnome-terminal. Switch to alt-[ and alt-], and stick to C-{ and C-} on Mac OS because that's what Safari does and applications are only supposed to use C-[ and C-] to mean "back" and "forward", which it would be slightly disingenuous to claim here. (I'd be happier with this decision if I actually used Terminator on Mac OS, so I'll listen to arguments.)


2006-02-10 01:48:12 +0000 / mad / revision 941

src/terminator/TerminatorServer.java: Allow the server to accept a workingDirectory argument.

bin/terminator: Always pass the workingDirectory to the server. Initialize it from the current directory (rather than the home directory) if the user doesn't specify it on the command line. I've done it like this because I think it'll be less surprising than the gnome-terminal behavior but I'm not that bothered by either choice. I was previously bothered by the inconsistency, in particular as it applied to the Shell Window tool in Edit, so I was in favor of the previous change at the time.

I don't much like this shared responsibility for parsing the command line, in particular the way I'm not taking advantage of InAppServer's command line parsing, but Shell Window is nice and quick. I think it's worth the extra lines.


2006-02-10 01:34:56 +0000 / mad / revision 940

native/all/pty/PtyGenerator.h: I was getting "bad lexical cast" when I wanted to be seeing:

chdir("newShell /home/martind")

Switch to an idiom I understand.


2006-02-09 22:58:07 +0000 / mad / revision 939

bin/terminator: Put some non-obvious motivations from the revision history where I'll see them when thinking about doing something which would break them.


2006-02-09 22:37:47 +0000 / mad / revision 938

src/terminator/Terminator.java: Support a gnome-terminal style --working-directory argument...

src/terminator/view/JTerminalPane.java: ... passing that to the TerminalPane...

src/terminator/terminal/TerminalControl.java: ... and thence to the TerminalControl...

src/terminator/terminal/PtyProcess.java: ... to the Java process starter...

native/all/pty/terminator_terminal_PtyProcess.cpp: ... and into the native code, where we preserve the default case of a null workingDirectory...

native/all/pty/PtyGenerator.h: ... in order to avoid calling chdir() in the child if the caller didn't specify a workingDirectory.

src/terminator/TerminatorMenuBar.java: Now the workingDirectory always has to be specified. It would be nicer if this were ProcessBuilder-style - so you only pay for those arguments you want to customize. Elliott thinks that collapsing TerminalControl and TerminalPane might do most of the job.

TODO: allow the Ruby script to use an existing process if all that's being customized is the working directory (allowing it to work on Mac OS X and improving start-up time on Linux.

TODO: use --working-directory in Edit's properties, to resurrect the Shell Window menu item. This was my motivation. I think I'm going to want that Shell Window in the directory of the file I'm editing more often now that terminator doesn't let me click on links. I foresee my work pattern being more Edit-centered than terminal-centered.


2006-02-09 20:06:20 +0000 / enh / revision 937

bin/terminator: don't cache $HOME, and change to the user's home directory (like gnome-terminal) so that new shells always start in the user's home directory.


2006-02-09 08:10:47 +0000 / mad / revision 936

src/terminator/terminal/TerminalControl.java: Suggest an improvement to something which confused me yesterday. Really, I just want to see if the install-everything version of terminator has a version number.


2006-02-09 02:03:58 +0000 / enh / revision 935

native/all/pty/terminator_terminal_PtyProcess.cpp: don't leak one fd per closed terminal.


2006-02-09 01:50:29 +0000 / enh / revision 934

src/terminator/LogWriter.java:
src/terminator/view/JTerminalPane.java: ensure that we don't keep log files open after the corresponding terminal has closed. (This shouldn't be necessary, but I don't have a good tool for finding out what's keeping the LogWriter alive.)


2006-02-08 04:00:04 +0000 / enh / revision 933

native/all/pty/terminator_terminal_PtyProcess.cpp: simonj reported seeing ENOENT errors, presumably because processes were exiting as we were scanning /proc. So ignore ENOENT too. (I've also switched to the new unix_exception::getErrno interface.)


2006-02-08 03:57:31 +0000 / enh / revision 932

native/all/pty/errnoToString.cpp:
native/all/pty/errnoToString.h:
native/all/pty/unix_exception.cpp: lose our (superior) implementation of unix_exception (and the associated errnoToString) to salma-hayek.


2006-02-06 04:52:09 +0000 / enh / revision 931

src/terminator/TerminatorMenuBar.java:
src/terminator/view/highlight/HyperlinkHighlighter.java:
src/terminator/view/JTerminalPane.java:
src/terminator/view/JTextBuffer.java: remove the "more trouble than it's worth" automatic linking of filenames. Hung NFS mounts, WANs, partitioned namespaces, and probably other things I've forgotten conspire against this feature, and Edit's "Find in Files" makes it mostly superfluous anyway.


2006-02-06 03:41:03 +0000 / enh / revision 930

src/terminator/Options.java: turn the menu bar on by default if we're using the GTK+ LAF.


2006-02-02 06:47:35 +0000 / enh / revision 929

src/terminator/TerminatorFrame.java: make use of JFrameUtilities' ability to set a frame icon. Also some improved comments that have been lying around for weeks.


2006-02-02 00:47:18 +0000 / mad / revision 928

www/index.html: Relax the documentation about which version actually gets selected.


2006-02-01 23:36:08 +0000 / mad / revision 927

www/index.html: Elliott installed jdk1.0.05_06 after jdk1.0.05_04 and the 1.5 JavaHome registry link was updated. Make the documentation strictly accurate.


2006-02-01 23:05:08 +0000 / mad / revision 926

www/index.html: Supporting JAVA_HOME adds complexity to the user experience and the code on Windows. Rip it out, now we'll do the right thing if only the JDK is installed.


2006-02-01 03:51:43 +0000 / mad / revision 925

native/Cygwin/WiX/terminator.wxs: Orca wasn't a happy badger:

ICE61 ERROR Upgrade.VersionMin and Upgrade.VersionMax cannot both be null. UpgradeCode is {978872F0-7B6B-11DA-A72B-0800200C9A66}
ICE61 WARNING This product should remove only older versions of itself. No Maximum version was detected for the current product. (UC978872F07B6B11DAA72B0800200C9A66)

I have a feeling that we'll be back here to reinstate the above warning, when we change the version numbering scheme. The trouble is that, when the installer doesn't do what you want, orca's the easiest way of finding out whether you've made an error. If we ignore its warnings, who knows what the consequences are? Probably nothing in this case but let's keep it clean until we have reason otherwise.


2006-02-01 03:42:46 +0000 / mad / revision 924

native/Cygwin/WiX/terminator.wxs: Ta-da: after much trial and error, may I present the incantation for automatically removing older versions. As you'd hope, it's trivial. Why isn't this easy to find on google?

You have to have an Upgrade tag, containing an UpgradeVersion tag, in order to get WiX to generate the right installer foo. The Upgrade Id is the same as the UpgradeCode.

The RemoveExistingProducts action doesn't get sequenced by default. http://sourceforge.net/mailarchive/forum.php?thread_id=9559999&forum_id=39978 contains a convincing argument as to why the documentation's suggested sequencing is a bad idea (so I've followed the advice here):

> IMO RemoveExistingProducts after InstallFinalize is not a good thing. If
> it's after InstallFinalize it is no longer in the audited part of the
> installation, so it's not properly integrated with rollback. You can get the
> situation where you install your upgrade, and then RemoveExistingProducts
> runs the uninstall of the older version. If this uninstall rolls back, you
> end up with both old and new versions of the product on the system, a mess.
> If RemoveExistingProducts is in the audited part, say just after
> InstallInitialize, and the install fails afterwards and rolls back, then
> RemoveExistingProducts will roll back too and you'll be left with the
> original product on the system.

Even better, it reveals the intention behind the mistake:

> It might be referred to in MS docs as the recommended location, but
> that's for optimization reasons.

Pah to MS and props to Phil Wilson.

Elliott suggested adding the version string to the product name, like many other applications do. If you're in Add/Remove programs, something bad has happened and you want all the help you can get.


2006-02-01 02:05:45 +0000 / mad / revision 923

native/Cygwin/WiX/terminator.wxs: Well that was easy, albeit poorly documented. Searching for a more convincingly relevant example than the one in the WiX FAQ, I came across this thread:

http://sourceforge.net/mailarchive/forum.php?thread_id=9559999&forum_id=39978

Which suggests how to uninstall old versions. Watch this space.

www/index.html: Remove said second sentence. If you failed to follow the hint in the first sentence, you now get told explicitly.


2006-02-01 00:37:38 +0000 / mad / revision 922

www/index.html: Neil reports that, if Ruby isn't installed, the installer doesn't produce an error message or a shortcut. It's probably not very much work to persuade WiX to persuade the Windows installer infrastructure to produce an error message - at which point the second sentence here be deleted.


2006-01-27 20:20:08 +0000 / enh / revision 921

bin/terminator: track API change from `which` to "which.rb".


2006-01-27 19:23:55 +0000 / enh / revision 920

native/Cygwin/WiX/terminator.wxs: use the ARPNOMODIFY property to disable the "Change" button on Windows 2000. Also sort the properties alphabetically.


2006-01-27 10:18:12 +0000 / mad / revision 919

bin/terminator: Use the Ruby which instead of clumsily invoking bash's builtin type -p. This should reduce the number of flickering windows on Windows. I'm not convinced it's done much good though. We invoke tic once and cygpath a good few times. I think the problem must have arisen with Cygwin 1.5.19 because I didn't used to see this. But still, this is tidier and Ruby'll have this built-in soon, I think.


2006-01-27 08:27:03 +0000 / mad / revision 918

native/Cygwin/WiX/terminator.wxs: Use the product GUID and version string which the new version of the salma-hayek makefiles have just made available, so that each installation is a "major upgrade" ie doesn't require explicit removal of the previous version.


2006-01-27 07:43:09 +0000 / mad / revision 917

native/Cygwin/WiX/terminator.wxs: How good is that WiX FAQ?

http://gauss.dynalias.net/wix/wixfaq.htm#howto-13 (another broken PTextArea highlight) says [

If you want to allow users to upgrade from one version to another without explicitly uninstalling (a major upgrade), each version must have a distinct product code, so typically a new release with a new version number warrants a new product code.

] and it works too. I'll automate this in a minute.


2006-01-27 06:42:55 +0000 / mad / revision 916

native/Cygwin/WiX/terminator.wxs: Blimey, the shortcut and the text files disappeared properly too.


2006-01-27 01:16:37 +0000 / enh / revision 915

bin/trap-all-sleep.sh: remove an old test script that was never used after being checked in, and about which we all forgot. It could theoretically be useful again, but we're not likely to remember its existence, and if we do, it will still be in the history and in gmail's search results.


2006-01-27 01:01:40 +0000 / mad / revision 914

native/Cygwin/WiX/terminator.wxs: Ran through tidy -xml -indent -modify. No (deliberate) functional changes.


2006-01-27 00:41:48 +0000 / mad / revision 913

native/Cygwin/WiX/terminator.wxs: Indeed we can get WiX to install us for all-users if it can. That's what the "2" means. If it succeeds, then we don't run into the Windows installer bug that means we get no icon in Add/Remove programs (per the link in the previous check-in comment).

Shiny red thing are us.


2006-01-27 00:33:29 +0000 / mad / revision 912

native/Cygwin/WiX/terminator.wxs: ARPCONTACT gives us an email address. APRPURLINFOABOUT turns the Manufacturer text into a link and provides the link destination. ARPPRODUCTICON doesn't work, even after a reboot, because of this http://support.microsoft.com/kb/q258558/. The work-around suggested there - ALLUSERS=1 on the command line - worked. I wonder if we can get WiX to do this. This article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/allusers.asp suggests that we want ALLUSERS=2.


2006-01-26 19:26:12 +0000 / enh / revision 911

TODO: car and martind are both against the idea of pausing logging and hiding the scroll bar while in alternate buffer mode. My initial fears about the performance impact and required disk space don't seem to have been a problem, and although the way xwsh used to disable the scroll bar for vi(1) was pretty, it wasn't particularly useful. Plus I use Edit these days anyway. Also add a couple of new comments from car.


2006-01-26 14:35:40 +0000 / mad / revision 910

native/all/pty/unix_exception.h: Lose the method definition to unix_exception.cpp and the class definition to One True copy in salma-hayek. The makerules incorrectly do not clean up obsolete links in .generated. You'll have to make clean to get rid of the link to this file.

native/all/pty/unix_exception.cpp: The errnoToString implementation of unix_exception is the only one which will now be linked with pty. This fixes a One Definition Rule violation, though the motivation was to fix the error reporting to use this variant again instead of the simple version included by DirectoryIterator.h from salma-hayek.


2006-01-26 13:02:35 +0000 / mad / revision 909

src/terminator/Options.java: Parse the xterm-style visualBell option.

src/terminator/view/VisualBellViewport.java: Use it to do nothing if the visualBell is disabled.

simonj wanted a silent bell. This will give it to him with no extra configuration - he already has xterm configured to be non-visual (and has presumably disabled his PC squeaker).


2006-01-26 10:35:12 +0000 / mad / revision 908

native/all/pty/terminator_terminal_PtyProcess.cpp: I clicked the close icon on a telnet window and was surprised to be told that my editor was about to be terminated. The telnet was on /dev/pts/2 and the editor on /dev/pts/28.

Why can't I scroll other terminal windows when the close confirmation dialog is displayed?


2006-01-26 09:41:31 +0000 / mad / revision 907

bin/terminator: Elliott's cunning idea to fix the rubyw-using desktop shortcut on Cygwin in the presence of world-writable directories on the PATH. We can make this conditional on being run with no $stderr (which is different from having stderr pointing at /dev/null) so it doesn't hide the messages if you run terminator from a terminal window. I wonder if we could generalize the MessageBox code from launcher.cpp and use that to shove any errors in the user's face. That'd be even more useful than putting them in the log (which is difficult this early in the script).


2006-01-26 09:12:13 +0000 / mad / revision 906

www/index.html: Stash a make binary containing the fix that's necessary to build with Cygwin 1.5.19 over Samba. The "15534" is a reference to the make bug number.


2006-01-26 09:02:05 +0000 / mad / revision 905

www/index.html: Fiddle with the make version description so it doesn't distort what I think is the truth:

I've long suspected that make-3.80-9 only fixes some of the fatal problems that we sometimes run into. Two people had fatal problems on Linux where they might have been using a 3.80 make and which didn't recur with a 3.81beta4 make. Elliott's never had a fatal problem with 3.80-9 on Mac OS X. I've never seen a fatal problem that was definitely on a 3.81beta on Linux.


2006-01-26 08:41:02 +0000 / mad / revision 904

bin/terminator: Hint at the need to specify the path to which(1) if we replace this type -p.


2006-01-26 07:06:48 +0000 / enh / revision 903

TODO: add up-to-date details of the bugs car reported. I already fixed the missing "Problem 4". We should probably get copies of those PNGs onto jessies.org before car7 is no more.


2006-01-26 05:05:25 +0000 / mad / revision 902

www/index.html: Update the Cygwin make binary from Debian's make-3.80+3.81.b4 source package to eliminate that from my inquiries.


2006-01-26 04:37:42 +0000 / mad / revision 901

www/index.html: I updated my Cygwin installation, de-installed a native Win32 Ruby, messed around with my PATH and, lo, the world-writable directory problem bit me on the bum. I rebooted before I realized what it was because I hadn't previously appreciated the seeming consequence of trying to doing standard I/O in a Windows subsystem application when you weren't run from a "console" window. Perhaps Ruby's just checking the result of its write()s to stderr. Perhaps it's a deliberate policy decision, so you have to be able to see the warning or it will refuse to run.


2006-01-26 04:18:29 +0000 / mad / revision 900

bin/terminator: On a default Cygwin installation, C:\cygwin\bin isn't on the PATH. bash always has to be in /bin, so we can avoid this dependency on the PATH with no loss.


2006-01-26 01:18:49 +0000 / enh / revision 899

TODO: this list is getting unwieldy, so bring related stuff together. Also add a new tab-related idea.


2006-01-23 01:44:27 +0000 / enh / revision 898

src/terminator/view/highlight/HyperlinkHighlighter.java: replace direct usage of JOptionPane with call to SimpleDialog.


2006-01-22 23:09:57 +0000 / enh / revision 897

src/terminator/InfoDialog.java: document current problems.


2006-01-22 06:56:03 +0000 / enh / revision 896

bin/terminator: remove duplication.


2006-01-22 04:35:39 +0000 / enh / revision 895

src/terminator/terminal/TerminalControl.java:
src/terminator/view/JTerminalPane.java: cope with ptyProcess being null when the JNI side fails to start. (If it weren't for me running the x86 client VM on my Opteron with an amd64 JNI library, this code would never work when it's actually needed!)


2006-01-21 21:15:05 +0000 / enh / revision 894

native/all/pty/PtyGenerator.h: unset another environment variable that might make debugging more difficult.


2006-01-21 21:00:48 +0000 / enh / revision 893

native/all/pty/PtyGenerator.h: use a better technique for closing inherited file descriptors.


2006-01-20 23:36:40 +0000 / enh / revision 892

src/terminator/Options.java: turn the menu bar on by default on Win32 too.


2006-01-20 22:21:58 +0000 / enh / revision 891

native/all/pty/PtyGenerator.h: I can't remember what I was reading on the web, but I came across a lot of information about variants of the "close all file descriptors in the child" technique this week. I'll improve our implementation over the weekend, but here are the notes I made.


2006-01-20 22:18:35 +0000 / enh / revision 890

src/terminator/terminal/PtyProcess.java: push the platform-specific code down into the JNI.

native/all/pty/terminator_terminal_PtyProcess.cpp: implement nativeListProcessesUsingTty for Cygwin and Linux now lsof(1) has proved itself too slow and too liable to hang. This mostly works on Solaris too, though we'll report each process' name as "unknown" there.


2006-01-17 20:08:30 +0000 / enh / revision 889

src/terminator/view/JTerminalPane.java: andyc complained about being warned when closing a window running just telnet(1), the only program he started in that window. I have some misgivings about the specific example of telnet(1) – or, more accurately, it's modern-day equivalent ssh(1) – because we don't know what's running on the other end of the connection, but he's right about his particular example being annoying and wrong. At the same time, I notice I didn't fix shouldHoldOnExit when I changed the sense of a boolean it uses, so we were removing the window when it would be useful and keeping it around when it probably isn't.


2006-01-17 03:29:48 +0000 / enh / revision 888

src/terminator/terminal/PtyProcess.java: on operating systems other than Mac OS, fall back to calling lsof(1) in the absence of the BSD sysctl we use. Also make a couple of unnecessarily-public native methods private.

TODO: part of a job done, and an interesting note.


2006-01-17 00:54:47 +0000 / enh / revision 887

src/terminator/InfoDialog.java: chrisa couldn't tell that the title field was editable, and it's easy to see why when the uneditable fields were almost indistinguishable on every platform but Win32.


2006-01-15 20:13:11 +0000 / enh / revision 886

src/terminator/terminal/PtyProcess.java: expose the direct child's process id and the functionality for listing (on Mac OS) all the processes using the tty.

native/all/pty/terminator_terminal_PtyProcess.cpp: return the empty string on other OSes, and include the pid of each process in the result on Mac OS, initially for the user's benefit (though it turns out to be useful for our currently implementation, too).

src/terminator/terminal/TerminalControl.java: give access to the PtyProcess.

src/terminator/InfoDialog.java: add a field to the "Info" dialog showing the processes using the tty.

src/terminator/TerminatorFrame.java: handle window closing ourselves, so we can go through the terminals confirming closure with the user if need be.

src/terminator/TerminatorMenuBar.java: also divert the "Close" action via our new code that checks with the user. (And, unrelated to the rest of this patch, add a "Debug" menu. I still need to polish this, but it's been useful enough to me already that I'm not going to remove it.)

src/terminator/view/JTerminalPane.java: rename "errorExitHolding" to "wasCreatedAsNewShell", which is what causes it to be set, rather than the behavior that being set used to cause. It's now also used in new code that confirms with the user that they really want to close a terminal that isn't just running the shell they started in it.


2006-01-13 00:45:15 +0000 / enh / revision 885

src/terminator/terminal/TerminalControl.java: martind managed to get a terminal into a state where all output was bold and was surprised that "Reset" didn't fix it. (You can test with "export PS1='$ ' ; tput bold" at the shell.)


2006-01-12 22:25:18 +0000 / enh / revision 884

TODO: more comments on tabs.


2006-01-11 03:34:48 +0000 / enh / revision 883

TODO: more comments on why we should have our own tabbed pane.


2006-01-10 21:36:22 +0000 / enh / revision 882

bin/terminator:
src/terminator/TerminatorServer.java: the previous revision was only secure through obscurity. If you knew to send "newTerminal " followed by NUL-separated arguments, you could still run anything you liked. This revision removes that functionality because it's not what this feature was intended to provide and is insecure.


2006-01-10 21:09:05 +0000 / mad / revision 881

bin/terminator: Clarify the uptodate? comment. A non-existent port file is by definition out-of-date, so we don't need that test. Drop back to starting a new process if a command is specified. This pretty much fixes the security hole for almost no work and stops existing terminals from having their options changed when someone starts a new terminal. It should also mean that my "runtitan" commands always block, like an xterm would, rather than sometimes exiting immediately. That should make it easier for me to avoid getting lots of stopping runtitan jobs. (Oddly, this last point was the motivation.)


2006-01-10 20:16:49 +0000 / mad / revision 880

RobP's home directory is on ukbluearc but he runs terminator on robroy. The hack in install-everything to remove the .terminator-server-port files was only intended to work for users with locally mounted home directories. It was like that to avoid trying to remove the files from any home directories which happen to be mounted and which might not be currently accessible, especially not by root - the user running install-everything.

bin/terminator: This is a more robust place to do the hack. Here we're running as the right user and we don't have to grovel around in the mount table to find the files which need removing. We can easily tell that install-everything.sh (or, possibly, a proper installer) has been run. The remainder of the gap between the actual test and the desired test only affects people who know about DEBUGGING_TERMINATOR. Hmm. We could test the timestamp of something which is changed by every invocation of make. The main .class file perhaps.

To come: a salma-hayek check-in to remove the install-everything hack.


2006-01-10 19:20:56 +0000 / mad / revision 879

native/Cygwin/WiX/terminator.ico: The Windows form of terminator-128.png (replacing the edit icon).


2006-01-10 19:19:36 +0000 / mad / revision 878

native/all/pty/terminator_terminal_PtyProcess.cpp: Fix Cygwin compilation. sysctl seems to be some whack BSD4.4/Linux-ism, so I've use Apple as the test rather than Cygwin.


2006-01-10 07:14:51 +0000 / enh / revision 877

src/terminator/TerminatorMenuBar.java: use appropriate GNOME stock icons.


2006-01-09 07:04:39 +0000 / enh / revision 876

src/terminator/view/JTerminalPane.java: remove code that's been dead since we switched to HORIZONTAL_SCROLLBAR_ALWAYS.


2006-01-09 06:47:07 +0000 / enh / revision 875

TODO: more notes.


2006-01-09 03:01:57 +0000 / enh / revision 874

TODO: note progress, record a new job.


2006-01-09 02:53:59 +0000 / enh / revision 873

TODO: new job.


2006-01-09 02:44:43 +0000 / enh / revision 872

bin/terminator: don't set an environment variable that we don't use.

native/all/pty/PtyGenerator.h: clean up the child's environment.

TODO: job done. $SECURITYSESSIONID should be left in place, and $DEBUGGING_TERMINATOR will get cleaned up when I institutionalize our debugging stuff to add support for enabling/disabling the Debug menu.


2006-01-09 01:31:58 +0000 / enh / revision 871

bin/terminator:
src/terminator/TerminatorFrame.java: track API change.


2006-01-09 01:20:32 +0000 / enh / revision 870

TODO: new job.


2006-01-08 19:46:59 +0000 / enh / revision 869

src/terminator/terminal/PtyProcess.java: remove accidentally-committed debugging output.


2006-01-08 19:46:23 +0000 / enh / revision 868

src/terminator/Terminator.java: remove "--version" (and friends). I don't want to have to maintain something that's no use when we come to add the build information in the about box.


2006-01-08 07:45:24 +0000 / enh / revision 867

native/all/pty/PtyGenerator.h: make the slave pty name available to the caller.

native/all/pty/terminator_terminal_PtyProcess.cpp:
src/terminator/terminal/PtyProcess.java: add fields for the slave pty name and whether the child dumped core. Mention in the signal description if the signal caused a core dump. Take advantage of the ability to return an int in nativeRead. Add listProcessesUsingTty (only supported on Mac OS, and currently unused).

src/terminator/terminal/TerminalControl.java: track API change.

TODO: a new job.


2006-01-08 07:25:03 +0000 / enh / revision 866

src/terminator/TerminatorFrame.java: use a more modern idiom.


2006-01-08 07:23:58 +0000 / enh / revision 865

src/terminator/view/JTerminalPane.java: remove unused field.


2006-01-06 19:29:20 +0000 / mad / revision 864

www/index.html: The link was only broken because google's links all point to eg:

http://www.jessies.org/~enh/software/terminator/

And this link starts with /salma-hayek.


2006-01-06 19:17:42 +0000 / mad / revision 863

www/index.html: Fix the cygwin-setup link. It'd be good if these links were testable in development work areas but linking to ../salma-hayek didn't work for me.


2006-01-06 03:12:05 +0000 / enh / revision 862

www/index.html: link to our more complete step-by-step Cygwin installation guide.


2006-01-05 07:02:54 +0000 / enh / revision 861

bin/terminator:
src/terminator/TerminatorFrame.java: use our icon as the frame icon.


2006-01-05 06:54:35 +0000 / enh / revision 860

bin/terminator: pass signal names through to Java.

src/terminator/terminal/PtyProcess.java: translate signal numbers if Ruby told us the corresponding name.

src/terminator/terminal/TerminalControl.java: use PtyProcess' signal description rather than making one up here.


2006-01-04 07:05:30 +0000 / enh / revision 859

lib/terminator-128.png: the 128x128 PNG icon.


2006-01-03 03:33:47 +0000 / mad / revision 858

native/Cygwin/WiX/terminator.wxs: Fix errors in terminator.msi detected by "orca", the MSI validator. The hyphen is a special character in the id field and it doesn't like versions that aren't in the Windows three or four component style. The InstallerVersion must be 150 or above to remove all warnings (although it's not clear whether any of them matter). Distressingly, because we install a shortcut to a file we didn't install, we seem to have to install a registry key under HKCU. This isn't just me trying random things - they made me do it:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/ice43.asp

And, after all this, grrr - the files still aren't removed after an uninstall.


2006-01-02 22:42:06 +0000 / enh / revision 857

src/terminator/TerminatorFrame.java:
src/terminator/TerminatorMenuBar.java: replace overly-specific interface now we need the more general case.

src/terminator/Frames.java: retrofit Iterable.

src/terminator/Terminator.java: report the number of terminals rather than the number of windows. Windows aren't the issue.


2006-01-02 22:32:35 +0000 / mad / revision 856

src/terminator/Terminator.java:
src/terminator/TerminatorMenuBar.java:
src/terminator/view/JTerminalPane.java: It doesn't sound like Chris has any use for --hold, indeed, it doesn't look from his output like he managed to use it. Elliott's quite forthright in saying that it isn't solving whatever his problem was with errorExitHolding being false for bash. Though it helped me look at the pre-bash environment, something I have to do occasionally, it wasn't solving the most difficult part of that problem. Given that I'll need to run a script to do that, it can just as easily be two scripts.


2006-01-02 22:10:04 +0000 / enh / revision 855

TODO: another suggestion; unlikely, but not ruled out.


2006-01-02 22:01:25 +0000 / enh / revision 854

TODO: TELNET is dead, and without widespread use of ZeroConf it's hard to see what advantage "Connect to Server" could really add. Especially now we've implemented more general functionality and "ssh " is only four characters.


2006-01-02 21:59:28 +0000 / enh / revision 853

src/terminator/TerminatorMenuBar.java: implement "New Command..." and "New Command Tab...". Abstract out existing duplication and invent new abstractions for common restrictions applying to actions (this means that our menu items' enabled/disabled should now be completely correct at all times). Use modern menu-creation idioms.

src/terminator/TerminatorFrame.java: remove overly-restrictive public interface in favor of tidying up the underlying interface and making that public.

src/terminator/Frames.java:
src/terminator/Terminator.java: add a mechanism to get hold of a suitable parent for forms.


2006-01-02 19:35:26 +0000 / enh / revision 852

TODO: a useful suggestion.


2006-01-02 19:10:49 +0000 / enh / revision 851

lib/terminator.icns: new PNGs from car, with various tweaks, but most importantly with alpha. I've used all the sizes he provided, because he went to some trouble to make the 't' more visible on smaller sizes (though Mail refuses to find the mail in which he explained that because it's having such trouble talking to the IMAP server at the moment).


2006-01-02 10:33:50 +0000 / mad / revision 850

native/Cygwin/WiX/terminator.ico: Add the wrong icon as a proof of concept. It's the closest I think I've got to the right one in a format I can read. native/Cygwin/WiX is a better directory to use than lib because a Mac user doesn't need the Windows icon. We could just check-in a portable format and generate the specific ones but that sounds like hassle for no benefit.

native/Cygwin/WiX/terminator.wxs: Use this rather than Cygwin's icon. Give it a more sensible id, which helps when searching the msiexec logs.


2006-01-02 08:56:39 +0000 / mad / revision 849

native/Cygwin/WiX/terminator.wxs: The WiX tutorial (specifically http://www.tramontana.co.hu/wix/lesson4.html) was very keen that I specify an UpgradeCode but I thought I'd try to get away without it. I was duly disappointed that the Windows installer infrastructure wouldn't repair a broken installation and insisted that I manually uninstall before reinstalling. That disappointed me enough that I didn't really think that this would fix it... but it does. Seemingly, I don't have to, and can't, specify a similar GUID on the salma-hayek module.


2006-01-02 04:34:21 +0000 / mad / revision 848

www/index.html: The Cygwin terminator installer is once again uploaded.


2006-01-02 02:09:10 +0000 / mad / revision 847

src/terminator/Terminator.java: No other terminal emulator seems to give a whit for command line compatibility and we don't support the common -e. Elliott argues that xterm's arguments on their own are insane. "noclose" looks like a spelling mistake, is grammatically dubious and isn't negating a "close" option. I'm not sure whether or not Elliott's arguing for configuring the functionality as a resource, if it's implemented at all. I deliberately chose not to because it wouldn't make sense to put this argument in .Xresources. We take the same line with -n, even though there's a xterm "title" resource. (xterm's -n sets the icon name. It has -title and -T for the title.) I deliberately chose to do that but I can see the arguments for doing it the other way.


2006-01-02 01:58:02 +0000 / mad / revision 846

src/terminator/Terminator.java: Parse a --hold argument to allow you, for motivating example, to inspect the output of "terminator --hold env". I've wanted to do this several times recently and, without this, it's quite hard. Try to start bash with a -c command argument from terminator and you'll see what I mean. The only way I'd previously got this to work was "terminator bash -c env&&false" or by writing a script to wrap env and exit with failure. It's no use starting bash and running "set" or "env" there. bash's startup scripts usually change the environment significantly. Today I wanted this to prove that terminator is adding its own bin to the PATH. BlueArc's startup scripts remove it again (as startup scripts are wont to do).

I *think* that env is the only thing I ever manually start bash for, so I could be convinced that a script is the way to solve this. This was, however, the only presented case where the errorExitHolding heuristic fails. This is my going the extra mile to fix that.

src/terminator/terminal/TerminalControl.java: Pass enough information to decide whether to hold on exit.

src/terminator/view/JTerminalPane.java: Store the configuration. Terminal uses a tri-state option for don't hold, hold on error, always hold. Embodying that might make the implementation nicer. Two boolean parameters constitutes a bad sign.


2006-01-02 01:34:47 +0000 / enh / revision 845

src/terminator/Terminator.java:
src/terminator/TerminatorFrame.java:
src/terminator/TerminatorMenuBar.java:
src/terminator/view/JTerminalPane.java: remove ugly duplication and be more consistent about terminology.


2006-01-02 01:17:03 +0000 / mad / revision 844

src/terminator/Terminator.java: It would be at least potentially useful for "terminator -n badger" to create a shell window titled "badger". It doesn't seem useful or consistent to create a UI with no terminal panes. Other reasonable alternatives would be to generate a syntax error or simply to ignore the name.

I was looking at this because I'm thinking of parsing "-hold" (xterm) or "--noclose" (konsole) here and wondering whether to pass the option to newShell, even though it isn't useful, for consistency.

src/terminator/TerminatorFrame.java:
src/terminator/TerminatorMenuBar.java: I could use a default argument or (better) separate newShell from newShellWithTitle but I'd rather make it clear that we're choosing not to set the title. We might want to derive the title from that of the current pane. Are we calling it "name" or "title" - we're inconsistent.

src/terminator/view/JTerminalPane.java: Allow the title to be customized but keep the old default, in the same style as newCommandWithTitle.


2006-01-02 01:11:07 +0000 / enh / revision 843

www/index.html: clarifications.


2006-01-01 22:41:23 +0000 / enh / revision 842

src/terminator/Terminator.java: update the copyright year.


2006-01-01 22:19:15 +0000 / enh / revision 841

src/terminator/Terminator.java:
src/terminator/view/JTerminalPane.java: car has complained before about the difficulty of getting Terminator to execute a multi-word command. Today he also complained:

  terminator "ssh some.host.somewhere" results in a window called "ssh"
  which is only slightly more useful than "/home/car"

fix both by passing the command through unmolested and using exactly what the user typed as the title.

TODO: job done.


2006-01-01 20:49:53 +0000 / enh / revision 840

lib/terminator.icns: car's first bash at an icon; one with alpha coming soon.

bin/terminator: use our own icon rather than borrowing Terminal's. Refer to the copy in our directory structure rather than where it'll end up in our app bundle so that we get the icon even when run directly from the shell.


2006-01-01 04:40:34 +0000 / mad / revision 839

src/terminator/Options.java: Having error-exit-holding always on or always off is never what any user wants. So remove the misleading, non-useful piece of configuration.

src/terminator/terminal/TerminalControl.java:
src/terminator/view/JTerminalPane.java: And put the code back essentially how Phil originally wrote it.

Elliott's broken this code twice. Neither time did he give a justification in the code or check-in comment. Well, that sometimes happens through the best of intentions when busy, for example, fixing the preferences code. However, he's never given a satisfactory explanation and there's no sign that he's going to, despite repeated requests and my holding off on this reversion for over a week. My conclusion is that he hasn't thought about it clearly enough.

This was what he has said, with my commentary interspersed [

i was always uncomfortable with that because it's only a heuristic.

]. The only, very rare, instance that's been presented where the heuristic gets it wrong, the preference gets it wrong too. That's where you've started a command which succeeded but produced interesting output in a new terminator. What's required to solve that is an additional command line "+hold" switch, to use the xterm terminology.

Elliott [

if we had a way to know that the just-exited process was bash, i'd be happy.

]. That's irrelevant because, as I said in the now-reinstated code comment, whatever the shell, the user will have seen any failure in the shell window. We're not talking about a case where the shell has crashed here. We're under a process.didExitNormally guard.

That reminds me: when he first added the preference, under the comment [

fix the errorExitHolding behavior by removing cruft.

], we weren't using the JNI child launcher. We were checking the returned value from Java's Process.waitFor. It's quite probable that that did cause us to do the wrong thing if the shell crashed. It took us some while after the switch to JNI to get the waitpid, WIFEXITED etc incantation right. Perhaps we don't have it right yet (though I've just tested it and I think we do) and perhaps bash does crash on Mac OS X (that does ring a bell). If our waitpid code's broken, our waitpid code wants fixing. We don't need a gruesome hack that's exposed to the user.

Elliott supplies another reason why bash is irrelevant [

it's odd that tcsh(1) has the same exit-mirroring behavior as bash(1)

]. Mirroring the exit status of the last run command will improve the reliability of scripts. The bash and tcsh authors haven't special-cased interactive shells. That's not really odd, although it's arguably unfortunate.

This is what I think is distracting Elliott and keeping him from thinking about this clearly [

Apple actually have code in Terminal to see what process is running so
they can distinguish shells from non-shells.

]. We don't need that to distinguish shells from non-shells. Phil got this right from the beginning. We're invoked differently to start a shell than we are to start other commands. "New Shell" or "terminator" without a command argument tells us that the user is starting a shell.

Perhaps, however, some users want to start their shells with command arguments. Perhaps, today, they're having a tcsh day. Do we have any users like that? I doubt it but such users would be in a perfect position to add "-hold" to the arguments. Until that's implemented, though, they're going to get errorExitHolding in their tcsh windows.

There's no argument with this! [

not using Terminator's functionality is fine. breaking Terminator's
functionality would be wrong.

]. Say the preference was still in the code. Our peculiar tcsh user wouldn't want to use it because it would mean that their telnet windows would disappear without telling them the error message. So this change is not the removal of some useful functionality: it's the removal of something which no-one who understood it would ever want to use. It's getting it right automatically, all of the time, instead of helping the user to manually get it wrong.

More distraction [

they follow the process hierachy too, so vim-in-bash won't close without a fight but bash-at-the-bash-prompt will.

]. That's a neat additional feature. Let's implement that some time. It's orthogonal.

Elliott claims (and I don't dispute) that Terminal and xwsh behave like the preference code I'm removing [

the original (and now current) behavior gives it the same interpretation as in other terminal emulators (xwsh and Terminal).

] though he later confuses me with [

i don't think xwsh(1)'s errorExitHolding used to behave like it does on
Mac OS with Terminal and bash(1). (that combination behaves exactly as we
do at the moment.)

]. There's plenty of precedent for closing without formality when bash exits with a failure status: rxvt, xterm, gnome-terminal and konsole all do this. We don't need to copy options which no-one finds useful. Anyone who does find them useful should explain why, so we can have a constructive discussion. I'm not averse to the solution involving some work, as this check-in comment shows.

Elliott has a number of suggestions for coping with the code as it was [

people who don't like it can turn it off.

]. That's just not acceptable because it means that telnet error messages are lost. Another [

if you don't like errorExitHolding, turn it off in your preferences and
override the preference when you run Terminator from the command-line, as
you suggested.

] by which I presume he means "turn it on each time you run telnet". That would work but, like the next suggestion, it inconveniences all reasonable users (who have to change a preference) for the benefit of, apparently, no-one [

if you don't like bash's default behavior, you can always put "exit 0" at the end of "~/.bash_logout".

]. I presume that would work but "bash won the shell wars". Until this discussion started, we didn't let the user use a different shell for their New Shell windows. It's worth five lines of simple cruft to better support bash, given that every single terminator user uses it as their shell.

I think this is Elliott's way of moaning about the division between TerminalPane and TerminalControl, something he's complained about before [

(i also dislike duplicating state, especially when it's duplicated in the
wrong class.)

]. The Pane/Control thing is probably a good point but orthogonal and, anyway, there's no duplicated state in this patch. There was duplicated state between the preference code and the bastardized code I came up with when I first "fixed" this problem. At that time, I didn't ask what purpose was served by the preference code: I just tried to accommodate it. I didn't look at the history either.


2006-01-01 00:50:50 +0000 / enh / revision 838

TODO: more information.


2005-12-31 20:40:13 +0000 / enh / revision 837

TODO: more notes on a suggested feature.

native/all/pty/PtyGenerator.h: note a possible improved Linux implementation.


2005-12-31 19:22:59 +0000 / enh / revision 836

src/terminator/Terminator.java: since the "quit?" dialog is only shown on Mac OS, and since we have the technology, make it actually look like a Mac OS dialog.

TODO: another related job.


2005-12-30 02:47:17 +0000 / enh / revision 835

src/terminator/view/JTextBuffer.java: correctly compare an index against a count.


2005-12-30 02:44:17 +0000 / enh / revision 834

src/terminator/view/VisualBellViewport.java: 100ms of visibility isn't long enough for the bell to be convincing. 300ms is too long. 200ms seems okay.


2005-12-30 02:38:09 +0000 / enh / revision 833

src/terminator/view/JTextBuffer.java: fix the other getTextLine problem I'm aware of (explained in the code comment):

at terminator.model.TextBuffer.getTextLine(TextBuffer.java:396)
at terminator.view.JTextBuffer.modelToView(JTextBuffer.java:364)
at terminator.view.JTextBuffer.redrawCursorPosition(JTextBuffer.java:597)
at terminator.view.JTextBuffer.setCursorPosition(JTextBuffer.java:318)
at terminator.model.TextBuffer.clearScrollBuffer(TextBuffer.java:122)


2005-12-30 02:28:27 +0000 / enh / revision 832

src/terminator/model/TextBuffer.java: avoid this exception when clearing the scroll buffer:

at terminator.model.TextBuffer.getTextLine(TextBuffer.java:396)
at terminator.view.JTextBuffer.modelToView(JTextBuffer.java:364)
at terminator.view.JTextBuffer.repaintFromLine(JTextBuffer.java:461)
at terminator.view.JTextBuffer.removeHighlightsFrom(JTextBuffer.java:433)
at terminator.view.JTextBuffer.redoHighlightsFrom(JTextBuffer.java:415)
at terminator.view.JTextBuffer.sizeChanged(JTextBuffer.java:217)
at terminator.model.TextBuffer.clearScrollBuffer(TextBuffer.java:115)

We don't need to redo the highlights because we've removed them all earlier in TextBuffer.clearScrollBuffer.


2005-12-30 02:16:14 +0000 / enh / revision 831

src/terminator/terminal/TerminalControl.java: put fields in order, make doStep private, don't invoke EscapeParser.toString when we're not debugging, and add a note about Konsole.

src/terminator/model/TextBuffer.java: provide a stack trace for problems in getTextLine, which seem to happen quite frequently (and presumably shouldn't).


2005-12-30 01:32:22 +0000 / enh / revision 830

src/terminator/terminal/TerminalControl.java:
src/terminator/view/JTerminalPane.java: use $SHELL instead of assuming that there's a "bash" on the path, and pass around the command to be executed as a String[] rather than joining and splitting all over the place.

src/terminator/Terminator.java: the only split is here (which we might want to fix in conjunction with the script).

src/terminator/LogWriter.java: the only join is here, for creating a name for a log file.


2005-12-29 22:26:07 +0000 / enh / revision 829

TODO: a hard job, but maybe Apple or Werner Randelshofer will do it for us.


2005-12-29 05:35:12 +0000 / enh / revision 828

www/index.html: a few more minor adjustments.


2005-12-29 05:13:36 +0000 / enh / revision 827

www/index.html: make an effort to bring some semblance of order to this increasingly sprawling mess. Particularly improved is the "Downloads" section, which now has a link to the Mac OS ".dmg", even if we still only manually update it.


2005-12-29 00:13:30 +0000 / enh / revision 826

src/terminator/model/TextBuffer.java: the previous revision broke "vpa", which could be seen by scrolling in vim(1). Another confusion between display-sized coordinates and history-sized coordinates.


2005-12-28 23:58:22 +0000 / enh / revision 825

src/terminator/model/TextBuffer.java: be more careful about 1-based and 0-based coordinates, and about the order in which various operations are performed. In particular, the cases where x or y are -1 are significantly different. We were also unconditionally assuming that vertical coordinates were relative to the start of the display. That this code was broken was easily demonstrated by editing a long line in tcsh(1), which uses the "hpa" terminfo capability. which causes TextBuffer.setCursorPosition to be called with y equal to -1.


2005-12-28 22:43:21 +0000 / enh / revision 824

bin/terminator: Debian testing/unstable's tic(1) is more broken than we realized.


2005-12-28 06:43:57 +0000 / enh / revision 823

src/terminator/terminal/TerminalControl.java: make TerminalControl.start idempotent to fix an error introduced by the detach-tab functionality (which was causing it to be invoked twice), and improve the implementation slightly.


2005-12-28 05:02:23 +0000 / enh / revision 822

TODO: add a pointer to interesting reading.


2005-12-28 05:01:01 +0000 / enh / revision 821

src/terminator/Terminator.java:
src/terminator/TerminatorFrame.java: remove useless field (and the constructor parameter used to initialize it).


2005-12-28 04:32:37 +0000 / enh / revision 820

src/terminator/Terminator.java: make Terminator.openFrame (the one true way to open a new window) take a JTerminalPane for the contents, rather than assume a new shell.

src/terminator/TerminatorMenuBar.java: add a "Detach Tab" Action, and make it available from the menu bar.

src/terminator/TerminatorFrame.java: also make "Detach Tab" available from the tab pop-up menu, and implement it. It works, with the minor exception of these being thrown:

  2005-12-27T18:35:28.851-0800 Terminator: Problem waiting for process
  Associated exception:
  java.io.IOException: waitpid(27428, &status, 0) failed: (No child processes)
        at terminator.terminal.PtyProcess.nativeWaitFor(Native Method)
        at terminator.terminal.PtyProcess.access$400(PtyProcess.java:9)
        at terminator.terminal.PtyProcess$2.call(PtyProcess.java:127)
        at terminator.terminal.PtyProcess$2.call(PtyProcess.java:125)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
        at java.util.concurrent.FutureTask.run(FutureTask.java:123)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:613)

TODO: job done, more or less.


2005-12-28 02:09:21 +0000 / enh / revision 819

src/terminator/Terminator.java:
src/terminator/view/JTerminalPaneFactory.java: lose JTerminalPaneFactory, and an incorrect comment.


2005-12-28 02:03:21 +0000 / enh / revision 818

src/terminator/Terminator.java:
src/terminator/TerminatorFrame.java: make TerminatorFrame's constructor take List<JTerminalPane> instead of JTerminalPaneFactory instances. The latter is a (useless?) implementation detail that just gets in the way in TerminatorFrame.

src/terminator/view/JTerminalPaneFactory.java: add a FIXME.


2005-12-27 20:07:34 +0000 / enh / revision 817

src/terminator/TerminatorFrame.java: offer a simple menu if the user right-clicks on a tab. Mainly so we'll have a good home for the "Detach Tab" action when it's written.


2005-12-27 01:06:55 +0000 / enh / revision 816

src/terminator/TerminatorFrame.java:
src/terminator/TerminatorMenuBar.java: use EMenuBar so we can override isEnabled to disable the next and previous tab actions when there are no tabs.


2005-12-26 00:21:52 +0000 / enh / revision 815

src/terminator/Options.java: Ed complained years ago that our color parsing doesn't work on a fresh Mac OS install, because X11 isn't installed by default. Emacs is, though, so we can use the copy of "rgb.txt" that comes with that.


2005-12-25 23:34:49 +0000 / enh / revision 814

lib/terminfo/terminator.tic:
src/terminator/Options.java: correctly document our level of color support.


2005-12-24 18:52:12 +0000 / enh / revision 813

lib/terminfo/terminator.tic: we don't support the blink text attribute, so we shouldn't claim to.


2005-12-24 07:06:48 +0000 / enh / revision 812

src/terminator/view/JTextBuffer.java: a recent change to improve the correctness of this code caused Java 6 to be able to spot that we had actually been resetting the wrong hint all along (i.e. we'd been using the wrong key as well as the wrong value).


2005-12-24 06:55:18 +0000 / enh / revision 811

src/terminator/view/CursorBlinker.java:
src/terminator/view/JTextBuffer.java: stop effectively caching the cursor blink preference at the cost of always paying for the timer and sometimes having to ignore the current value of blinkOn.


2005-12-24 06:46:15 +0000 / enh / revision 810

src/terminator/terminal/TerminalControl.java:
src/terminator/view/JTerminalPane.java: stop caching the "errorExitHolding" preference.


2005-12-24 06:41:05 +0000 / enh / revision 809

src/terminator/Options.java: slight rewording for the dialog.


2005-12-24 06:38:51 +0000 / enh / revision 808

src/terminator/Options.java:
src/terminator/Terminator.java: cause all frames to be repainted whenever an option changes.


2005-12-24 04:13:26 +0000 / enh / revision 807

src/terminator/view/JTextBuffer.java: don't cache the text anti-aliasing option.


2005-12-21 07:27:12 +0000 / enh / revision 806

src/terminator/Options.java: fix parsing of color resources.


2005-12-21 04:49:31 +0000 / enh / revision 805

www/index.html: lose the CSS to salma-hayek, and reject parochial character encodings.


2005-12-20 08:04:17 +0000 / enh / revision 804

lib/terminfo/terminator.tic: remove the capabilities for various shifted special keys because I've not seen them used by terminal-based programs, and we actually use two of these ("kNXT" and "kPRV") ourselves (to scroll on non-Macs.)


2005-12-20 07:56:13 +0000 / enh / revision 803

lib/terminfo/terminator.tic: remove the "kmous" capability, which claims that we support XTerm mouse-location sequences (we don't).


2005-12-20 07:54:54 +0000 / enh / revision 802

lib/terminfo/terminator.tic: confirm "kdch1" is correct, and remove capabilities for various keys that just don't exist on a PC/Mac keyboard.


2005-12-20 07:49:03 +0000 / enh / revision 801

lib/terminfo/terminator.tic: bring the terminfo in line with what the code actually does (which is implement VT220 escape sequences). Also document some as-yet unchecked keys (the shifted special keys).

src/terminator/view/JTerminalPane.java: use the VT220 sequences for two keys where we were using XTerm sequences.


2005-12-20 07:35:09 +0000 / enh / revision 800

lib/terminfo/terminator.tic:
src/terminator/view/JTerminalPane.java: sort the function key sequences in our terminfo, and tidy up and document the function key handling code. Remove support for function keys we can't test.


2005-12-19 20:39:47 +0000 / mad / revision 799

www/index.html: Chris kindly provided the copy-and-paste instructions, which I was angling for, to install terminfo on FreeBSD.


2005-12-19 18:20:51 +0000 / mad / revision 798

www/index.html: I wonder if I can provoke Chris into telling us exactly how to install terminfo support on FreeBSD.


2005-12-19 02:36:57 +0000 / enh / revision 797

src/terminator/Options.java: fix support for parsing X11 resource strings to take into account the fact that our options are now properly typed.


2005-12-19 02:04:24 +0000 / enh / revision 796

src/terminator/Terminator.java: only run Mac OS-specific code on Mac OS. We should do this stuff ourselves, better, such that it's transparent.


2005-12-19 00:54:09 +0000 / enh / revision 795

src/terminator/Options.java: note down what I know about using Apple's Terminal's defaults.


2005-12-19 00:41:17 +0000 / enh / revision 794

TODO: a job done, and a job description moved...

src/terminator/Options.java: ...to where it would be implemented.


2005-12-19 00:38:49 +0000 / enh / revision 793

src/terminator/Terminator.java: use a better idiom for accessing com.apple.eawt.Application; the preferences-related code should probably move into the Options class.


2005-12-19 00:24:36 +0000 / enh / revision 792

src/terminator/Terminator.java: use the new AboutBox class.


2005-12-17 07:08:46 +0000 / enh / revision 791

bin/terminator: don't keep a file open and taking up one of the Java process' file descriptors.


2005-12-17 01:46:33 +0000 / enh / revision 790

lib/terminfo/terminator.tic: while fixing X11 and installing Terminator on johnh's new machine the other day, I noticed that vim(1) behaved differently under xterm(1) than it does for us. It turns out that it looks to see if $WINDOWID gives it a window it can get/set the title of, and enables its "title" setting if so. It then uses either the X11 mechanism or escape sequences (take a look at the code if you want to see a particularly disgusting example of over-complicated multi-platform chronic-featuritis #ifdef-hell C) to set the window's title. Although it's hard to see how we can set $WINDOWID correctly for our users, we can at least support the relevant terminal capabilities ("tsl" and "fsl"), and learn a bit more about terminfo into the bargain. Add "set title" to your "~/.vimrc" to see the benefit.


2005-12-16 07:19:58 +0000 / enh / revision 789

src/terminator/Options.java: the beginnings of support for a more or less automatically-generated preferences dialog.

src/terminator/Terminator.java: activate the standard Mac OS preferences menu item. (Pretend you can't see the stuff about "About".)

src/terminator/TerminatorFrame.java: I've removed the default title preference, because I don't see the use of it.

src/terminator/model/StyledText.java: looking around for cached preferences (there are some, and I need to come back and fix them later), I noticed an abbreviation that needs removing.


2005-12-15 22:51:49 +0000 / enh / revision 788

www/index.html: car and martind both expressed confusion with the old explanation of the font properties, which both assumed you were familiar with Java and familiar with "--help" to list Terminator's supported properties.


2005-12-15 21:45:36 +0000 / enh / revision 787

TODO: update.


2005-12-15 21:39:05 +0000 / enh / revision 786

src/terminator/TerminatorMenuBar.java: use the new "Help" menu.


2005-12-14 10:00:50 +0000 / mad / revision 785

native/Cygwin/WiX/terminator.wxs: Use the less amateurish URL that Chris gave us.


2005-12-14 06:00:09 +0000 / mad / revision 784

bin/terminator: The one day, Rodney, answer to the TODO:

the binary distributions won't contain the source, and will be pre-built anyway. the source distributions won't have anything compiled, and you'll have to build it yourself.

A more pragmatic reason for doing the same:

(21:49:05) hughes_elliott@hotmail.com: as far as we know, the attempted bootstrap is no use to anyone. especially because it won't help in the potentially interesting cases like "wrong libc version" or "64- instead of 32-bit".

And, expanding on the same:

There are users who install-everything (which does this for them, falling back to trying to download a native-dist) and their are Subversion users, who build their own anyway.


2005-12-14 05:34:39 +0000 / mad / revision 783

bin/terminator: Motivation: to see if the shiny new checked-out/terminator gets updated.


2005-12-14 05:20:49 +0000 / mad / revision 782

bin/terminator: The intention here is to trigger an post-commit hook failure because there's not yet a locally checked-out copy of terminator.


2005-12-13 06:50:14 +0000 / enh / revision 781

TODO: note down some of the outstanding problems with Terminator.


2005-12-11 06:38:57 +0000 / enh / revision 780

TODO: another job.


2005-12-11 06:36:16 +0000 / enh / revision 779

src/terminator/TerminatorMenuBar.java: use the right keystrokes on Mac OS.


2005-12-11 06:27:46 +0000 / enh / revision 778

src/terminator/TerminatorMenuBar.java:
src/terminator/view/JTerminalPane.java: car points out that "Next Terminal" and "Previous Terminal" is incorrect. Imitate Safari's phrasing of the functionality we're actually offering.


2005-12-11 06:09:35 +0000 / enh / revision 777

doc:
doc/terminfo:
doc/terminfo/terminator:
doc/terminfo/terminator.tic:
lib: doc/ becomes lib/. Documentation should be HTML in www/, and we need somewhere for support files, and lib/ seems like a good traditional name we can use in any project.

bin/terminator: track name change.


2005-12-09 23:20:05 +0000 / enh / revision 776

src/terminator/terminal/PtyProcess.java:
src/terminator/terminal/TerminalControl.java:
src/terminator/view/highlight/FindHighlighter.java: use ThreadUtilities to get an Executor that gives meaningful names to its threads, and creates daemon threads so we can actually exit cleanly.


2005-12-09 03:58:28 +0000 / enh / revision 775

src/terminator/Frames.java:
src/terminator/Terminator.java: Ed points out that the invisible window used on Mac OS to ensure that we always have a menu bar gets included when cycling through the application's windows with C-` and C-~. Fix that by only making the window visible when it's needed to provide a menu bar.


2005-12-07 19:56:10 +0000 / mad / revision 774

www/index.html: Chris points out that the escape sequence for setting the window title is wrong. (We parse it in XTermEscapeAction.java. That doesn't appear to have changed - this just seems to have been a typo in the web page.)


2005-12-06 22:24:39 +0000 / enh / revision 773

src/terminator/Options.java:
src/terminator/view/VisualBellViewport.java: add a new "fancyBell" resource, defaulting to true, that controls whether to use our traditional visual bell or a cheap XOR-based one. The latter is useful if you're displaying on a remote X11 server, though it doesn't look good enough to be the default. If I knew of a way to detect when we're displaying on a remote display, I'd make this configuration automatic.


2005-12-04 19:14:17 +0000 / enh / revision 772

www/index.html: clarification.


2005-12-04 06:28:12 +0000 / mad / revision 771

bin/terminator:
src/terminator/Terminator.java: Append the value of the environment variable $DISPLAY, or the empty string if that's not set, to the name of the terminator-server-port file. This should make it possible to start terminator on more than one X11 display on the same machine at once (without having to know about this optimization) while, I hope, having no consequence for non-X11 systems.


2005-11-29 02:58:20 +0000 / enh / revision 770

src/terminator/InfoDialog.java: I could have been more helpful to chrisa today if I could have renamed a Terminator tab; this should fix that in future (on the unrealistic assumption that stella is updated regularly). Make the title field editable, and in passing make makeTextField (and the objects it creates) a little more intention-revealing.


2005-11-21 01:23:20 +0000 / enh / revision 769

src/terminator/LogWriter.java: correct a misleading comment.


2005-11-18 02:56:49 +0000 / enh / revision 768

src/terminator/terminal/TerminalControl.java:
src/terminator/Terminator.java: remove redundant casts.


2005-11-17 23:01:21 +0000 / mad / revision 767

src/terminator/Terminator.java: Exit with failure if, for example, we fail to initialize X11 because $DISPLAY is unset (because we've forgotten that we're ssh()d somewhere), so the launcher script knows to cat the e/util/Log file even if DEBUGGING_TERMINATOR is unset.


2005-11-17 22:47:40 +0000 / mad / revision 766

bin/terminator: invoke-java.rb now takes care of this more carefully than we were doing here.


2005-11-17 22:13:26 +0000 / mad / revision 765

bin/terminator: It's hard to engineer a situation in which system(*args) returns false, so this disjunct is pretty much pointless but it may as well be correct.


2005-11-17 18:26:20 +0000 / mad / revision 764

bin/terminator: simonj keeps complaining about the two tic errors, one of which is due to our terminfo file's contents and the other due to some problem with the Debian tic/ncurses:

"/home/martind/software.jessies.org/terminator/doc/terminfo/terminator.tic", line 8, terminal 'terminator': missing sgr string
"/home/martind/software.jessies.org/terminator/doc/terminfo/terminator.tic", line 8, 'terminator' /usr/bin/tic: symbol lookup error: /usr/bin/tic: undefined symbol: _tracef

I'd discovered the other day that the Debian problem only happens if you use -v2 or higher. While testing this change, I discovered that tic is failing before copying the terminfo file when it hits that error. The other "error" is really just a warning but, again, is only produced when tic is run in verbose mode.

We already have a way of telling the script whether or not we're interested in debugging terminator. It seems not too unreasonable to only nag in that case.


2005-11-16 21:33:56 +0000 / mad / revision 763

bin/terminator: Lose another cygpath - and our final Java option - to invoke-java.rb.


2005-11-16 21:10:45 +0000 / mad / revision 762

bin/terminator: invoke-java.rb now makes JNI a little easier - and removes the need for one more piece of Cygwin-awareness from the applications.


2005-11-14 00:07:32 +0000 / enh / revision 761

bin/terminator: switch to "invoke-java.rb".


2005-11-13 05:40:04 +0000 / enh / revision 760

src/terminator/Terminator.java: don't just silently refuse to quit on Mac OS if we've got windows open.


2005-11-10 03:22:29 +0000 / enh / revision 759

src/terminator/view/highlight/HyperlinkHighlighter.java: remove over-use of SwingUtilities.getAncestorOfClass.


2005-11-09 02:13:57 +0000 / enh / revision 758

TODO: Ed did this the other day.


2005-11-08 19:26:37 +0000 / mad / revision 757

bin/terminator: The File::PATH_SEPARATOR was wrong for the same reason it was wrong in edit. The problem should go away when invoke-java.rb becomes JavaInvocation.rb.


2005-11-08 19:22:19 +0000 / enh / revision 756

bin/terminator: remove the work-around for old versions of Ruby now that other stuff we "require" causes us to transitively require "fileutils.rb" and "pathname.rb" anyway; add the com.apple.eawt stubs if we're not on Mac OS.


2005-11-08 05:07:47 +0000 / enh / revision 755

bin/terminator:
src/terminator/Terminator.java:
src/terminator/TerminatorServer.java: track API change.


2005-11-07 19:59:38 +0000 / enp / revision 754

src/terminator/Terminator.java: Integrate better with Mac OS X : open a new terminal
when the dock icon is clicked if there aren't any already open, and quit on Command-Q
if there aren't any terminals open. It's arguable whether it should let you quit
whenever you tell it whether you've got terminals open or not – Terminal.app lets
you quit, but warns you if there are processes running other than login and bash.


2005-11-03 07:05:37 +0000 / enh / revision 753

www/index.html: remove more $JAVA_HOME cruft.


2005-11-03 05:37:33 +0000 / mad / revision 752

bin/terminator: We could use launcher.exe for all Java applications on Cygwin and always make swing-worker.jar available but the extra -D arguments stop invoke-java.rb from being a complete replacement for the Java invocation stuff here. Still, we can collapse the duplicated definition of cygpath().


2005-11-02 21:29:48 +0000 / enh / revision 751

bin/terminator: track new idiom.


2005-10-28 15:32:30 +0100 / mad / revision 750

src/terminator/terminal/TerminalControl.java: Defer the decision on holding the window open when the child dies with a non-zero status...

src/terminator/view/JTerminalPane.java: ... so that shell windows can behave differently to, say, telnet windows. If telnet fails, which happens quite often, then the user won't get to see the error message unless we hold the window open. bash, on the other hand, won't fail (except in pathological cases). It will often, however, return a non-zero exit status. It does this when the last command it ran failed. The user will have already seen the failure. It's boring to require the user to manually close the window in this common case.


2005-10-21 08:28:22 +0100 / enh / revision 749

src/terminator/view/VisualBellViewport.java: I expected Ed to correct his own finger-slip, but since he hasn't, here's one last thing before I go to bed...


2005-10-20 17:30:55 +0100 / enp / revision 748

src/terminator/view/VisualBellViewport.java: Wondering why my CPU usage was
sometimes hovering around the 15-20% mark but often dropped to zero again
upon closing a Terminator window, some poor man's profiling revealed frequent
visual bell viewport repaints. javax.swing.Timer repeats by default, so
excessive painting was occurring after the bell had rung once. CPU usage back
to normal with a one-shot timer.
The excessive CPU usage being more noticable when more filename hyperlinks are
shown suggests the highlighting could be improved too.


2005-10-13 21:32:32 +0100 / mad / revision 747

www/index.html: The "3.80-9" is a Debian package version number. We should stick to their format unless there's a good reason otherwise. I don't think the previous check-in changed this intentionally (it didn't seem justified by the comment).


2005-10-10 07:15:43 +0100 / enh / revision 746

www/index.html: give the darwin ppc make binary a more sensible name (from the point of view of the uploader/downloader of multiple make binaries).


2005-10-05 08:56:31 +0100 / mad / revision 745

www/index.html: Now I can stop apologizing for the lack of a Windows installer. Job's a good 'un, I'm off home.


2005-10-05 08:34:22 +0100 / mad / revision 744

native/Cygwin/WiX/terminator.wxs: This seems to work even when the current drive for the installer is other than C:\. I think that's going to be more likely to work than a hard-coded C:\.

http://msdn.microsoft.com/chats/transcripts/windows/05_0315_wi.aspx had suggested %windir%\.. might work but it didn't for me, nor did %SystemDrive%. (I didn't really understand what they were talking about.)


2005-10-05 08:18:21 +0100 / mad / revision 743

native/Cygwin/WiX/terminator.wxs: A blank icon is surprisingly hard to find. Use the Cygwin icon, as we invoke the Cygwin shell by default.

I thought I was being clever with the change to use $(env.SystemDrive) for finding the Cygwin installation's rubyw.exe. It was only when I used SystemDrive again to find the icon and then realized that it's bundling the icon into the .msi that I realized it's evaluating SystemDrive on my machine, not on the target machine.


2005-10-05 07:56:01 +0100 / mad / revision 742

native/Cygwin/WiX/terminator.wxs: *What* a palaver. I couldn't find any examples of anyone setting a shortcut to point to file they didn't install. I had to go back and read through more of the tutorial. FileSearch had to be the answer but what a hairy way to specify a path! And this isn't even what I really want to do, which is:

`cygpath --windows rubyw.exe`

bin/terminator: Oh no, we're installed in a directory with a space in the name. Can this really be the only problem line? It seems to be, but I fear this isn't a maintainable way to develop. I can see my having to come along adding random quotes when someone else breaks the Windows build. It would be a more sustainable idea to use cygpath in a similar way to that used by universal.make, to convert the salma_hayek and terminator_home variables to forms without spaces. Who said DOS names are useless?

Anyway, this gets us the first really fully working, useful Windows install. Woo hoo!


2005-10-05 05:54:49 +0100 / mad / revision 741

www/index.html: Update to reflect the new extension for the Windows native-dist file. That slightly simplifies the installation instructions at the expense of vastly complicating the instructions on what to install to be able to build.


2005-10-05 03:54:40 +0100 / mad / revision 740

native/Cygwin/WiX/terminator.wxs: salma-hayek's installer is now but an .msm - it no longer pretends to be a stand-alone program.


2005-10-05 03:39:44 +0100 / mad / revision 739

native/Cygwin/WiX/terminator.wxs: Merge in the salma-hayek module. That should really be called salma-hayek.msm according to the documentation, although it seems to work OK when it's called .msi. Initially, merging this gave me the following error:

light.exe : error LGHT0001 : COM object with CLSID {F94985D5-29F9-4743-9805-99BC3F35B678} is either not valid or not registered.

Exception Type: System.Runtime.InteropServices.COMException

Stack Trace:
at Microsoft.Tools.WindowsInstallerXml.Binder.MergeModules(String databasePath, Output output)
at Microsoft.Tools.WindowsInstallerXml.Binder.Bind(Output output)
at Microsoft.Tools.WindowsInstallerXml.Tools.Light.Run(String[] args)
make: *** [/cygdrive/f/software.jessies.org/terminator/.generated/native/Cygwin/WiX/Cygwin/terminator.msi] Error 1

Google told me that I'd have to install the Platform SDK to fix that(!). Fortunately, only the installer SDK part seems to be necessary, although it's still a long install. The id refers to a COM class which is registered by mergemod.dll. Well, I say "registered by". Microsoft tell you to do this:

regsvr32 "C:\Program Files\Microsoft Platform SDK\Bin\MergeMod.Dll"

MSDN links always break but here's the regsvr bit:

http://support.microsoft.com/kb/329214/EN-US/

And here's the free download of the Platform SDK:

http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en


2005-10-05 02:34:54 +0100 / mad / revision 738

native/Cygwin/WiX/terminator.wxs: Gain the special-case files from the hard-coded list which I haven't hacked the script to treat specially.

native/Cygwin/WiX/component-definitions.wxi: Lose the rest of the hard-coded file list now we can generate a complete list automatically.


2005-10-05 01:40:44 +0100 / mad / revision 737

native/Cygwin/WiX/terminator.wxs: The WiX documentation says that we don't have to specify the version of the installer, the description or manufacturer for a second time. Although a description doesn't seem like a bad idea, I don't know where it was presented to the user anyhow. I'm assuming that we would like the installer compressed.

http://software.jessies.org/ doesn't work, so give a link which does work, even though the Add/Remove Programs wizard won't let the user click on it or even copy it.

Oh yes, and add the version. According to the documentation, it's just a string, so we don't (yet) need to jump through multiply dotted hoops.


2005-10-05 01:17:38 +0100 / mad / revision 736

native/Cygwin/WiX/terminator.wxs: Somehow (I failed to reproduce it) I ended up with a directory called PFiles in the generated WiX directory. WiX is welcome to put whatever clutter it likes in there but I'd rather not use bogus names. I'd copied that from a sample, thinking it had an internally special meaning, like ProgramFilesFolder, but seemingly not.


2005-10-04 19:17:34 +0100 / mad / revision 735

native/Cygwin/WiX/terminator.wxs: A proper GUID through the gift of google "GUID generator Microsoft" and clicking on a button on someone's web page:

http://www.hoskinson.net/webservices/guidgeneratorclient.aspx


2005-10-04 10:56:47 +0100 / mad / revision 734

native/Cygwin/WiX/terminator.wxs: This needs a unique product GUID, something to integrate the version number (from Subversion?), support for a salma-hayek "merge module", the desktop shortcut magic and an icon. Other than that, it's pretty much there.

native/Cygwin/WiX/component-definitions.wxi: I've hard-coded the file list for the minute. If we still had a .jar file, I'd probably have been motivated enough to hard-code it all but with all the classes files, this needs solving properly. We'll need to generate DOS names. Looking at what the tallow utility does, we can just make up any old whack. tallow is supposed to generate this file list for us but I couldn't make it do anything sufficiently useful to look worthwhile. Google suggested that other people have had the same experience. It shouldn't take much of a Ruby script to replace it. The README -> README.txt rewrite might be worth a special case in said Ruby script. Or we could just rename the original files to be more Windows-friendly. I'm leaning towards the latter but I'm easy.


2005-10-04 10:43:48 +0100 / mad / revision 733

native/Cygwin/WiX: Add a directory for an experimental Windows installer.


2005-10-04 10:40:48 +0100 / mad / revision 732

native/Cygwin: Add a directory for an experimental Windows installer.


2005-09-26 01:51:00 +0100 / enh / revision 731

src/terminator/FindDialog.java: when searching for the current selection, take case into account even when the selection is all-lowercase.


2005-09-25 21:03:52 +0100 / enh / revision 730

bin/terminator:
src/terminator/view/highlight/FindHighlighter.java: use SwingWorker to avoid the problem johnh had where the Find dialog would take seconds to appear as it blocked the EDT while searching two months worth of SPEC output. This isn't the cleverest implementation (it doesn't publish partial results), but it is the simplest, and the least duplicative.


2005-09-25 19:30:05 +0100 / enh / revision 729

src/terminator/view/highlight/FindHighlighter.java: simplification.


2005-09-25 19:27:02 +0100 / enh / revision 728

src/terminator/FindDialog.java:
src/terminator/view/highlight/FindHighlighter.java: fix the names now we deal in patterns rather than regular expressions.


2005-09-25 19:24:01 +0100 / enh / revision 727

src/terminator/FindDialog.java:
src/terminator/view/highlight/FindHighlighter.java: remove the need for FindHighlighter.setRegularExpression to return anything.


2005-09-25 19:19:48 +0100 / enh / revision 726

src/terminator/FindDialog.java:
src/terminator/view/highlight/FindHighlighter.java: use "smart case" in Terminator's find dialog, too, and refactor a little with the eventual intent of moving the heavy lifting off the EDT.


2005-09-25 18:34:30 +0100 / enh / revision 725

src/terminator/Terminator.java: you're not allowed to initialize your UI other than on the EDT.


2005-09-22 08:08:16 +0100 / enh / revision 724

src/terminator/view/JTextBuffer.java: almost as soon as I'd mailed the SpaceSequence implementation to mad, I started to dislike it. It wasn't particularly efficient, it was too verbose, it wasn't particularly general, and it definitely wasn't in the right place.


2005-09-22 07:59:13 +0100 / enh / revision 723

doc/terminfo/terminator.tic: dump the audible bell, because no-one in their right mind wants that. Reinstate the "flash" capability (visual bell).

src/terminator/view/JTerminalPane.java:
src/terminator/view/VisualBellViewport.java: use a new viewport to flash the visual bell when necessary.

src/terminator/terminal/TerminalControl.java: switch out the beep for a flash instead. (We reused the "bell" capability's value for "flash".)


2005-09-22 06:39:34 +0100 / enh / revision 722

doc/terminfo/terminator.tic: make a start at demonstrating we can properly document our terminfo file. There are no changes to any capabilities in this revision.

src/terminator/terminal/TerminalControl.java: proper handling of "bell", since we claim it in our terminfo.


2005-09-22 06:20:46 +0100 / enh / revision 721

doc/terminfo/terminator.tic: Solaris' vi(1) – not vim(1) – uses the cvvis capability to make the cursor very visible. Originally, our entry read "do show cursor; don't blink cursor". We've never implemented do/don't blink cursor, so at some point that part was removed. tic(1) then complained that cvvis and cnorm were identical, so rather than remove cvvis or change it back, someone changed it to do the opposite of cnorm and hide the cursor. I looked at implementing support for turning cursor blink on/off, but couldn't come up with a correct, small, and tasteful implementation in the time I allowed myself. So let's just do the right thing in the absence of cursor blink control, and remove our cvvis capability.


2005-09-22 00:59:43 +0100 / mad / revision 720

src/terminator/view/JTextBuffer.java: If the line was shorter than the getCharOffset (minus one) then we would return the position at the end of the line, rather than at the desired offset. That breaks vim's "nopaste" mode. This broke when adapted for fonts where all the glyphs aren't the same width. Elliott argues persuasively that any missing characters between the end of the line and the desired offset should be spaces.


2005-09-21 23:41:08 +0100 / mad / revision 719

src/terminator/LogWriter.java: When we suspend terminal logging, we should flush the stream, so the file contents are current. This makes it possible to suspend the logging, load/revert the file in Edit, resume logging, press the one key that causes a problem, suspend the logging, bring up the revert-to-saved dialog in Edit and see what the application sent you. (I'm trying to track down some "invisible space" problem in vim for SimonJ with :set nopaste.)

Is it safe to take to a file out of the check-box action? I like the use of e.util.Log I've injected into terminator.LogWriter. We can't call both of them "Log" without some disambiguation - it's confusing me, never mind any users.


2005-09-21 20:31:01 +0100 / mad / revision 718

www/index.html: Add a Linux make-3.81beta3 binary (which I've just uploaded), be consistent about the name of the Cygwin link, sort the links.


2005-09-21 08:10:19 +0100 / mad / revision 717

www/index.html: Part of the previous check-in comment combined with my previously documented experience today, reinforces my suspicion that Debian make regressed between 3.80-9 and 3.80-11. So, if we're going to get pedantic, let's be correct, even if "good" is a horribly vague word.


2005-09-21 08:04:25 +0100 / enh / revision 716

www/index.html: add a link to a Solaris 10/amd64 make binary, and make it clearer what the links are links to. I'm still using the downloadable make binary on Mac OS, so we know it's okay.


2005-09-21 07:08:56 +0100 / enh / revision 715

src/terminator/view/JTerminalPane.java: use the newly factored-out code in StringUtilities.


2005-09-21 06:52:34 +0100 / enh / revision 714

src/terminator/terminal/TerminalControl.java: pull some of the initialization out of the constructor...

src/terminator/view/JTerminalPane.java: ...so we can use a partially-initialized TerminalControl to display start-up failure even if (that is, "because") we couldn't start a sub-process.


2005-09-21 04:54:08 +0100 / enh / revision 713

src/terminator/view/JTerminalPane.java: exit when the user's read our failure message. I'd have preferred to use announceConnectionLost, but the TerminalControl isn't set up yet.


2005-09-21 04:01:47 +0100 / mad / revision 712

.cvsignore: While simplifying the make dist rule and comparing the lists of included files, I came across this obsolete file.


2005-09-21 01:43:11 +0100 / mad / revision 711

www/index.html: Rather than mailing software@jessies.org, I'll put my latest symptom somewhere more widely visible.


2005-09-21 01:38:56 +0100 / mad / revision 710

www/index.html: Clarify my current belief about the required make version. apt-get dist-upgrade must have overwritten the copy of make-3.81beta3 which was on my PATH at some point. That's how I know that 3.80-11 isn't always good enough.


2005-09-21 01:34:11 +0100 / mad / revision 709

www/index.html: Clarify the use of JAVA_HOME based on my investigation of Carfield's experiences.


2005-09-21 01:07:29 +0100 / mad / revision 708

.: Rename generated to .generated and lose the obsolete jar file.


2005-09-21 01:03:13 +0100 / mad / revision 707

bin/terminator: pty and launcher move as a result of the generated->.generated rename.


2005-09-21 00:58:56 +0100 / mad / revision 706

A couple of times in the last week, I've seen this when terminator's not running:

martind@duezer:~$ terminator
/home/martind/software.jessies.org/terminator/bin/terminator:51: Interrupt
martind@duezer:~$ rm ~/.terminal-logs/.terminator-server-port
martind@duezer:~$ # now it works

Line 51 is the readlines() one:

  telnet = Net::Telnet.new('Host' => 'localhost', 'Port' => port, 'Telnetmode' => false)
  telnet.puts("new #{command}")
  print(telnet.readlines().join(""))
  telnet.close()

native/all/pty/PtyGenerator.h: This is very similar, both in what it does and where it is in the code, to libvte4's equivalent (that being the terminal emulation module of gnome-terminal). rxvt does similar.
  
xterm does nothing and suffers from the same problem. Well, that's perhaps unjustified. Its source contains some measures like close-on-exec to close descriptors which it has opened, rather than using the sledgehammer approach of attempting to speculatively close every possible file descriptor. The call it uses - fcntl(F_SETFD) - is specified by POSIX.1.

This fixed the problem for me on Linux 2.6.12 with libc 2.3.5-6 and didn't break my Cygwin version.


2005-09-20 20:53:39 +0100 / enh / revision 705

src/terminator/TerminatorFrame.java: I'm sure I'd fixed this before, but I certainly don't remember fixing it in this way, and I can't find any signs of an earlier attempt at a fix.


2005-09-20 20:19:51 +0100 / mad / revision 704

www/index.html: Update the web page to reflect that the Linux shared library is no longer part of the main dist.

native/all/pty/PtyGenerator.h: Missing include, found trying to compile on libc22.us.dev.bluearc.com.

I still can't compile because the only strerror_r found in /usr/include is the incompatible one noted in the (up-to-date) Linux man page. Humph.


2005-09-20 19:15:17 +0100 / mad / revision 703

bin/terminator: My mistake: we don't seem to build the jar unless someone explicitly asks for it. We definitely shouldn't be using it, then - it'll be out-of-date.


2005-09-18 23:53:04 +0100 / mad / revision 702

www/index.html: Carfield ran into this annoying warning and so did I, although the only thing I now have in /usr/local/bin is make, which I put there.


2005-09-18 21:15:25 +0100 / enh / revision 701

doc/terminfo/terminator.tic: remove another lie from our terminfo; we don't support full-screen reverse video, so shouldn't pretend to. Solaris will try to use it.

src/terminator/terminal/escape/CSIEscapeAction.java: fix formatting and improve diagnostic output.

bin/terminator: put all the terminfo-related stuff together, and all the icon-related stuff together, and stop mixing the two up.


2005-09-18 20:08:11 +0100 / mad / revision 700

www/index.html: It wouldn't be *that* much quicker (although still noticeably quicker) if I didn't have DEBUGGING_TERMINATOR set. The terminator-server-port hack does work on Windows.


2005-09-18 04:01:29 +0100 / enh / revision 699

native/all/pty/PtyGenerator.h: cope with Solaris' weird STREAMS-based terminal implementation. This code seems to be present in all the usual suspects' source. I also notice that everyone but us seems to pass O_NOCTTY to open(3), and it doesn't seem to break anything, so let's remove that difference too. It's not a necessary change for fixing Terminator on Solaris, though.

bin/terminator: now that Terminator itself is working on Solaris, let's fix the script too. Solaris' tic(1) doesn't have a -o option, and claims to use the TERMINFO environment variable we've already set.


2005-09-17 22:57:49 +0100 / mad / revision 698

bin/terminator: Use the new uname replacement. We're asking at least two different questions here - "what's the name of the directory the make rules have created?" and "what is the OS we're running on?". I could have faffed about choosing different names for the same value according to which question I thought was being asked at each call site. It didn't seem worth it to me, until we've got a reason to distinguish them, but I'm open to persuasion.

www/index.html: The name of the native-dist for Cygwin has changed. I've also renamed the make(1) binary directory and left a symlink for the old name.


2005-09-16 08:16:29 +0100 / mad / revision 697

www/index.html: Add appropriate boilerplate to be able to get through http://validator.w3.org/ checks, which spotted a bug that I introduced the other day.


2005-09-16 06:52:23 +0100 / mad / revision 696

www/index.html: I'm not sure where I got the idea that it's -subsystem instead of --subsystem. The flag we're using has a double minus.


2005-09-16 06:51:25 +0100 / mad / revision 695

bin/terminator: Use launcherw in the normal case but the console-subsystem version when debugging is required. This makes it possible to get the terminator log (as opposed to the terminal log) in the "spurious" ruby window brought up by Shortcuts which refer to ruby.exe instead of rubyw.exe.

To ask for debugging, right-click My Computer, use the Advanced tab, click the Environment variables button and add a variable DEBUGGING_TERMINATOR set to "true".


2005-09-16 05:34:27 +0100 / mad / revision 694

www/index.html: It's not entirely obvious how to run terminator from a Shortcut on the Windows desktop. Getting rid of the "spurious" window also took a deal of research, despite the solution being easy.

I've attempted to reassure the reader that they're not losing, for example, any unhandled exception messages from the Java. We don't make those messages easy to find. We should give the path to the terminator log as well as the terminal log in the Show Info box. We can't expect users to run with DEBUGGING_TERMINATOR=true, even if run like that.

It's so slow to start a new terminator on Windows that the Alt-N shortcut is worth mentioning. We know that users don't discover the shortcut for themselves.


2005-09-16 04:53:38 +0100 / mad / revision 693

www/index.html: Move the $JAVA_HOME comment into the paragraph about Java. Move the justification for using Cygwin next the paragraph about how to set up Cygwin. Move the paragraph bragging about "running fine" out of the Download section into the Running section.


2005-09-16 04:50:11 +0100 / mad / revision 692

www/index.html: I duplicated this statement the other day, when I added links for the binaries for non-Linux platforms.


2005-09-14 18:09:41 +0100 / mad / revision 691

src/terminator/view/JTerminalPane.java: Send the same key code for Insert as rxvt instead of sending nothing. This makes it possible to scroll in screen(1). So *that's* why I've never been able to work out how to use it.


2005-09-14 07:18:12 +0100 / mad / revision 690

www/index.html: Link to the native-dist uploads, making careful note that you need salma-hayek's as well on Cygwin. The ~enh address is no longer the "right" address, although it still works. I think we can use a relative link instead but who knows until I upload this?


2005-09-13 23:53:45 +0100 / mad / revision 689

www/index.html: I noticed we had a binary for Debian's make-3.80-9 for Darwin kicking around in ~software which, I meant to add, I've had to make og-w so that ssh software@jessies.org works. I've moved it somewhere less anti-social and put my Cygwin one in an appropriate peer directory. Perhaps this will link to the right places.


2005-09-13 23:21:02 +0100 / mad / revision 688

.: Stop "make dist" from cluttering checkintool.


2005-09-13 19:59:47 +0100 / mad / revision 687

www/index.html: I'd forgotten that I'm not using Cygwin's make. Perhaps we should make the binaries available. And, hmm, the comments on make aren't terminator-specific. Perhaps a separate page on building jessies projects is in order.


2005-09-13 19:32:01 +0100 / mad / revision 686

www/index.html: We don't include Mac OS X binaries in the distribution either.


2005-09-06 19:50:53 +0100 / enh / revision 685

src/terminator/terminal/PtyProcess.java:
src/terminator/terminal/TerminalControl.java:
src/terminator/view/JTerminalPane.java: I recently upgraded the C++ library on bertha, causing the JNI library to fail to load:

  java.lang.UnsatisfiedLinkError: /home/elliotth/Projects/terminator/generated/native/all/pty/Linux/libpty.so: /home/elliotth/Projects/terminator/generated/native/all/pty/Linux/libpty.so: undefined symbol: _ZNSt15basic_streambufIcSt11char_traitsIcEE15_M_out_cur_moveEl
  
Handle the error in an appropriate place to show a dialog, rather than expecting the user to hunt around for a log file.


2005-09-02 07:08:39 +0100 / mad / revision 684

src/terminator/view/JTerminalPane.java: Fix the Ctrl-H and Ctrl-J behavior to be like rxvt's, so they don't generate the same mangled sequences as Backspace and Enter. That solves the problems I tried to solve earlier when I moved the code to the keyPressed handler. A hack but hopefully an unintrusive one.


2005-09-02 06:49:21 +0100 / mad / revision 683

src/terminator/view/JTerminalPane.java: That last change caused every Enter to inject two \n characters. The penny finally dropped: I'm getting a keyPressed event and a keyTyped event for the same key press. We can't stop the keyTyped events from coming and I'm having trouble thinking of a sensible way to know which ones we should ignore. The simplest way is process all keys which generate keyTyped events exclusively in the keyTyped handler. That's what we were doing before (though it wasn't clear from the code). It's not correct for the reasons given in the previous two check-ins, but it's close. If we ignore all keyTyped events, which seems to be the other alternative, then we won't, I think, be able to take advantage of Alt-keypad character composition without coding it ourselves.

So back out the previous two check-ins and change the one before that to handle VK_DELETE via its Ascii.DEL keyTyped event. This restores Enter's behavior to sanity and fixes paulb's complaint.


2005-09-02 05:58:40 +0100 / mad / revision 682

src/terminator/view/JTerminalPane.java: Ctrl-V Ctrl-J was producing ^M in terminator and making some kind of line-feed type of cursor motion in rxvt. You can see where I'm heading with this series of changes. It seems sensible to get there before looking again at the original problem I wanted to solve. I'm checking things in piecemeal to be sure I justify each change so, when it turns out to be not the whole story in future, we can go back and see what I tested and what I didn't test.


2005-09-02 05:52:42 +0100 / mad / revision 681

src/terminator/view/JTerminalPane.java: Ctrl-V Ctrl-H in rxvt produces ^H in bash. With terminator, it was indistinguishable from pressing backspace. That wasn't right though, again, this isn't going to help Paul's issue.


2005-09-02 05:48:14 +0100 / mad / revision 680

paulb said today "that's what I don't like about terminator" and it turned out that he meant that delete seems to work synonymously with backspace, as far as bash on Linux is concerned (at least).

src/terminator/view/JTerminalPane.java: Our terminfo entry says we return this string for the delete key. This doesn't fix the problem but it's got to be a step in the right direction. Though I have some other hacks make it difficult to be sure, delete now does backspace *and* what you'd expect from delete. Odd!


2005-08-27 03:35:34 +0100 / enh / revision 679

www/javac-jp-monaco.png: new screenshot, showing javac(1) outputting Japanese error messages.

www/index.html: add the new screenshot, correct a few bits of orthography.


2005-08-26 22:07:05 +0100 / mad / revision 678

www/index.html: Update the Win32 prerequisites.


2005-08-26 20:36:38 +0100 / enh / revision 677

www/index.html: document a consequence of wide-glyph support.


2005-08-23 17:51:14 +0100 / mad / revision 676

src/terminator/view/JTerminalPane.java: Known inconsistencies need documenting.


2005-08-23 17:20:34 +0100 / enh / revision 675

src/terminator/view/JTerminalPane.java: take the gap in Java key codes between VK_F12 and VK_F13 into account, and better document the other holes, and whose fault they are.


2005-08-23 17:00:50 +0100 / enh / revision 674

project.rpf: remove unused file.


2005-08-23 16:57:31 +0100 / enh / revision 673

src/terminator/view/JTerminalPane.java: I don't know where mad got his escape sequences, but they didn't correspond to what I was expecting, what Google suggested, and what the source of xterm and rxvt suggests. Nor was there support for all the function keys on my Mac's keyboard. (Apple's Terminal.app sends different sequences – the PF sequences – for F1-F4. I wonder what our terminfo says? I think we should go with xterm and rxvt, though.)


2005-08-23 15:13:47 +0100 / mad / revision 672

src/terminator/view/JTerminalPane.java: Pavel Tsekov requests support for the function keys, the better to use Midnight Commander. I did sudo apt-get install mc to give this a cursory test. I can at least now use F10 to quit. Fortunately, that part of the display was legible. We appear to have utterly mullered the rest with all sorts of box drawing characters. It seems odd that our new user hasn't mentioned this.


2005-08-23 08:54:58 +0100 / mad / revision 671

bin/terminator: I turned on verbose output in tic to see if I could discover why "man ps" says "WARNING: terminal is not fully functional" on Cygwin. That said:

$ tic -v10 /cygdrive/f/software.jessies.org/terminator/doc/terminfo/terminator.tic
"/cygdrive/f/software.jessies.org/terminator/doc/terminfo/terminator.tic", line 14, terminal 'terminator': Conflicting key definitions (using the last)
... KEY_F(0) is the same as KEY_F(10)
"/cygdrive/f/software.jessies.org/terminator/doc/terminfo/terminator.tic", line 14, terminal 'terminator': cursor_visible is same as cursor_normal
"/cygdrive/f/software.jessies.org/terminator/doc/terminfo/terminator.tic", line 14, terminal 'terminator': missing sgr string

$ infocmp -L rxvt terminator
comparing rxvt to terminator.
  comparing booleans.
    auto_right_margin: T:F.
    back_color_erase: T:F.
    backspaces_with_bs: T:F.
  comparing numbers.
    no_color_video: NULL, NULL.
  comparing strings.
    cursor_visible: NULL, '\E[?25h'.
    delete_character: NULL, '\E[P'.
    exit_attribute_mode: '\E[m\017', '\E[m'.
    exit_ca_mode: '\E[2J\E[?47l\E8', '\E[?47l\E8'.
    insert_character: '\E[@', NULL.
    key_backspace: '\177', '^H'.
    key_f0: NULL, '\E[21~'.
    key_f21: '\E[23$', NULL.
    key_f22: '\E[24$', NULL.
    key_f23: '\E[11\136', NULL.
    key_f24: '\E[12\136', NULL.
    key_f25: '\E[13\136', NULL.
    key_f26: '\E[14\136', NULL.
    key_f27: '\E[15\136', NULL.
    key_f28: '\E[17\136', NULL.
    key_f29: '\E[18\136', NULL.
    key_f30: '\E[19\136', NULL.
    key_f31: '\E[20\136', NULL.
    key_f32: '\E[21\136', NULL.
    key_f33: '\E[23\136', NULL.
    key_f34: '\E[24\136', NULL.
    key_f35: '\E[25\136', NULL.
    key_f36: '\E[26\136', NULL.
    key_f37: '\E[28\136', NULL.
    key_f38: '\E[29\136', NULL.
    key_f39: '\E[31\136', NULL.
    key_f40: '\E[32\136', NULL.
    key_f41: '\E[33\136', NULL.
    key_f42: '\E[34\136', NULL.
    key_f43: '\E[23@', NULL.
    key_f44: '\E[24@', NULL.
    keypad_local: '\E>', NULL.
    keypad_xmit: '\E=', NULL.
    parm_dch: NULL, '\E[%p1%dP'.
    parm_ich: '\E[%p1%d@', NULL.
    reset_2string: '\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E=\E[?1000l\E[?25h', '\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>'.
    set_a_background: '\E[4%p1%dm', '\E[%p1%'('%+%dm'.
    set_a_foreground: '\E[3%p1%dm', '\E[%p1%{30}%+%dm'.
    set_attributes: '\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;', NULL.
$

doc/terminfo/terminator.tic: That clearly showed that we have a definition for key_f0 when we shouldn't have. I looked at the source code and I think we're parsing the rxvt cursor_visible sequence rather than the one we've been claiming in the .tic file. So I've fixed those two errors by updating our terminfo entry from rxvt's current entry. I don't know what to do about the set_attributes nonsense or, indeed, the many other differences that we haven't deliberately introduced. I'm particularly interested to see that key_backspace one, given my change the other day. Our entry's lying about the code we produce for the backspace key - except on Windows. Argh!


2005-08-22 17:42:50 +0100 / enh / revision 670

bin/terminator: now we require Java 5, which isn't available on Mac OS before 10.4, there's no point having a work-around for a bug in an earlier version of Mac OS.


2005-08-22 01:15:58 +0100 / enh / revision 669

TODO: job done.


2005-08-22 01:04:48 +0100 / enh / revision 668

src/terminator/view/JTextBuffer.java: get a proper modelToView method, and use it instead of the old cruft. This is neater, more efficient, and fixes the cursor painting. Switch to Graphics2D so we can use fill(Rectangle) rather than pull out all the fields ourselves, and so we can remove unnecessary casts.


2005-08-22 00:33:35 +0100 / enh / revision 667

src/terminator/view/JTextBuffer.java: add a FIXME.


2005-08-21 21:15:03 +0100 / enh / revision 666

www/index.html:
www/mac-os-greek.png: add an example of our UTF-8 capabilities.


2005-08-21 21:14:07 +0100 / enh / revision 665

src/terminator/view/JTextBuffer.java: fix highlighting and selection for Greek and Japanese, where not all glyphs are the same width.


2005-08-21 19:45:59 +0100 / enh / revision 664

src/terminator/FindDialog.java:
src/terminator/model/TextBuffer.java:
src/terminator/model/TextLine.java:
src/terminator/view/highlight/FindHighlighter.java:
src/terminator/view/highlight/HyperlinkHighlighter.java:
src/terminator/view/highlight/SelectionHighlighter.java:
src/terminator/view/JTextBuffer.java: TextBuffer.getText and getTabbedText become getString and getTabbedString; "text" is already far too overloaded, and it's a bad sign when I have to refactor some code to find that the method I wanted to add is actually already there, but in an unexpected class and with a strange name.


2005-08-21 19:34:13 +0100 / enh / revision 663

src/terminator/model/TextBuffer.java:
src/terminator/view/highlight/FindHighlighter.java:
src/terminator/view/highlight/HyperlinkHighlighter.java:
src/terminator/view/highlight/SelectionHighlighter.java:
src/terminator/view/JTextBuffer.java: improve naming; TextBuffer.get becomes getTextLine and JTextBuffer.getLineText becomes getLineStyledText. Remove TextBuffer.getLine in favor of calling getText on the result of getTextLine.


2005-08-21 19:06:21 +0100 / enh / revision 662

src/terminator/view/JTerminalPane.java: remove unused method.


2005-08-21 15:16:07 +0100 / mad / revision 661

bin/terminator: Although the Sun java launcher understands class names of the form package.class, the JVM itself only seems to understand package/class. My java launcher does the minimum possible - deferring everything to the JVM. Given that the Sun launcher understands the slash form too, keep the Cygwin port simple by using terminator/Terminator.

By identical logic, use -Djava.class.path instead of the more conventional -cp. Switch to using my freely licensed launcher on Cygwin.

Copy the cygpath logic from javahpp.rb, so I can do away with the badly self-rolled version from here. That lets me tidy-up the classpath (which is now half the size!) and the pty_path and lets me easily fix logging on Cygwin (which was the motivation).


2005-08-21 08:14:50 +0100 / enh / revision 660

www/index.html: reorder the feature list into alphabetical order (we should have *some* order, and that's probably the least contentious, even if it does encourage careful choice of bullet text). Add a note about drop target support (which has been there a long time, but is perhaps more useful to Win32 users than Unix users). Slight clarification of the section on VNC.


2005-08-21 07:59:22 +0100 / enh / revision 659

src/terminator/TerminalDropTarget.java: make the treatment of dropped files more useful. For one thing, always append a ' ' after each filename so that the user can just drop another file or type the next word without having to hit the spacebar. More importantly, quote filenames on the assumption that they're being given to bash(1). Rather than using backslash escaping (as Terminal.app does), use double-quote escaping for a more human-readable result. While we're here, pull the file list handling code out of the 'drop' method for clarity.


2005-08-21 06:07:55 +0100 / mad / revision 658

www/index.html: Replace references to Unix with POSIX or remove, as appropriate. Replace the reference to C with one to C++. Stick to the point in the portability bullet. Replace "Mac OS" with "Mac OS X", somewhat anally, so no-one thinks we're into retro portability. Be honest about how much effort we've spent on ensuring that Terminator is easy to run.

Mention Windows. We don't have a very good out-of-the-box experience on Windows but that would be fixable. You never know: if we mention it, we might even get someone volunteering to help.

I considered mentioning TeraTerm and SecureCRT but I'm only really familiar enough with PuTTY to say that I think we're a good replacement. To be clear, I don't have any reason for thinking that it'd be worth even trying the other two programs I've seen people use. Our QA guys once told me that they use TeraTerm because it offers better scripting capabilities than PuTTY, which stores configuration in the Windows Registry. I *suspect* that terminator already offers just as good scripting.

Mention UTF-8. Who knows if we really support it properly? It's daft not to advertise it when it was only ten minutes work to implement something that's at least partly working. *Billions* of people are doubtless waiting for this in order to switch.


2005-08-21 04:54:32 +0100 / mad / revision 657

I was hinting to one of our users that he might want to watch out for any unfortunate changes in the latest version. I wanted to give him a hint as to what had changed and so where he might like to be especially observant. The thought had occurred that Ctrl-C keyboard input can no longer overtake pasted input. I wanted to mention UTF-8 support too but, although pasting a non-ASCII character (from Windows Character Map) gave me two bytes, the output was two characters.

src/terminator/terminal/TerminalControl.java: The transformation from byte to char was pretty obvious, although I had to resort to the Edit source to find the InputStreamReader incantation (having failed to find it among all the other reader nonsense in the javadoc).

sudo dpkg-reconfigure locales now doesn't get its box characters mangled (for reasons I haven't looked into). Interactivity doesn't seem to have been busted by any buffering. Bad UTF-8 sequences seem to get rendered as the Unicode REPLACEMENT CHARACTER, which is nice. Markus Kuhn's UTF-8-demo.txt looks much more plausible. Talking of the Great Kuhn, he has some advice for terminal emulators regarding UTF-8 at:

http://www.cl.cam.ac.uk/~mgk25/unicode.html#term

Among other interesting information that we should revisit if we ever make a serious effort to support a more complete set of control codes, he says:

  It is important to understand that a terminal emulator in UTF-8 mode must apply the UTF-8 decoder to the incoming byte stream before interpreting any control characters.

I think I've adhered to that with this change. He also notes that xterm supports UTF-8 these days and I see that there are versions of rxvt which do:
  
http://freshmeat.net/projects/rxvt-unicode/?branch_id=47099&release_id=153956

Although neither of the Debian versions that I have installed on my box seem to support it, judging by the mess they make of UTF-8-demo.txt. Even though we don't have any requests for it, it seems silly not to support UTF-8 when we get it for free.


2005-08-20 21:07:26 +0100 / enh / revision 656

src/terminator/view/highlight/SelectionHighlighter.java: I don't know why I don't like the same "copyChangedSelection", but it's been annoying me. Perhaps it's because the "copy" doesn't really come across as a verb. (The new name makes it sound like an interface method, but I haven't been able to come up with anything better.) Make it private while I'm here.


2005-08-20 20:50:22 +0100 / enh / revision 655

src/terminator/TerminalDropTarget.java:
src/terminator/view/JTextBuffer.java: remove JTextBuffer.insertText, which is no longer doing anything worthwhile.


2005-08-20 02:38:41 +0100 / mad / revision 654

src/terminator/view/JTextBuffer.java: Lose the 1024 character hack, which just made the problem less likely, probably by slowing us down. Lose the thread to sendUtf8String, where it will catch all writes, not just big ones.

src/terminator/terminal/TerminalControl.java: Always write to the pipe on a separate thread, so pipe waits can't block the event dispatch thread. With this, I've failed to cause a lock-up using big pastes and concurrent keyboard input in a couple of minutes of trying. I think this is the proper fix for that problem.


2005-08-20 02:11:02 +0100 / mad / revision 653

src/terminator/terminal/TerminalControl.java: Remove worrying-looking code which was unconditionally sending \r\n. Nothing was calling it. The motivation was really to see if sendUtf8String was an expedient place to make the writing asynchronous. Now it's the only place which writes, it seems so.


2005-08-20 01:36:53 +0100 / enh / revision 652

src/terminator/terminal/TerminalControl.java: martind correctly guessed that UTF-8 isn't the default encoding for String.getBytes. If we ask for UTF-8, pasting sends the correct bytes. (Odd that we can't provide a CharsetEncoder and have to pay for the lookup each time.)


2005-08-20 01:22:08 +0100 / enh / revision 651

src/terminator/view/JTerminalPane.java: do what the previous FIXME suggested, and move away from char and towards String.

src/terminator/terminal/TerminalControl.java:
src/terminator/view/JTextBuffer.java: ...including getting rid of sendChar completely, with its evil lossy cast to byte. (Note that I still can't paste non-ASCII text from Wikipedia in Firefox, though Edit copes perfectly.)


2005-08-20 00:48:59 +0100 / enh / revision 650

src/terminator/view/JTerminalPane.java: new FIXME.


2005-08-20 00:43:04 +0100 / mad / revision 649

src/terminator/view/JTerminalPane.java: Get the unusual (and perhaps impossible) KEY_UNDEFINED case out of the way with an early return.


2005-08-20 00:41:53 +0100 / mad / revision 648

src/terminator/view/JTerminalPane.java: Fix backspace under Windows. This makes (cygwin) vim and (native) jdb work.

Looking at the rxvt-2.7.8 source and trying to ignore the complexity, it basically always seems to send ^?. (If you press Shift or Ctrl, you get ^H.) It does look at the tcgetattr but, I think, only to copy the settings from the initial tty to the spawned ones. The user's free to change the stty erase setting later so, unless we re-read it all the time, we won't know what the latest setting is. It seems wrong to second-guess the user like that anyway. The stty settings are the user's mechanism for coping with problems between the terminal and the equipment on the other end. If we start changing the ground under their feet, that'll make things more confusing than they already are.

The Linux console and X, Mac OS X and Solaris all seem to use ^? by default. I didn't know before today that ssh transfers the key mappings (search for ssh "terminal modes"). Telnet doesn't.


2005-08-20 00:32:26 +0100 / enh / revision 647

src/terminator/terminal/escape/CSIEscapeAction.java:
src/terminator/terminal/TerminalControl.java:
src/terminator/view/JTerminalPane.java:
src/terminator/view/JTextBuffer.java: be more explicit about the fact that we'd like to be a UTF-8 terminal emulator. (We're not, though. Not in terms of input or output.)


2005-08-20 00:29:23 +0100 / enh / revision 646

src/terminator/terminal/escape/CSIEscapeAction.java:
src/terminator/terminal/TerminalControl.java:
src/terminator/view/JTerminalPane.java: looking at getSequenceForKeyCode, I was confused by the VK_ESCAPE case returning "". So let's lose the implicit escapes, and the sendEscapeSequence method, and improve this method's name while we're at it.


2005-08-17 09:10:29 +0100 / mad / revision 645

simonj wanted middle button paste and implicit copying of the selection to the clipboard on Win32. After using terminator on cygwin for a while in earnest, I see that that's what my subconscious is also expecting.

I couldn't just hack the existing methods in good conscience. The existing methods - copyToSystemSelection and pasteSystemSelection - did one thing and that thing was exactly what the name suggested. Even when on a platform where you exclaim "I have no SystemSelection!", the methods do the obvious thing - nothing.

src/terminator/view/highlight/SelectionHighlighter.java: I think what we really want, then, is a new method which is called when the selection is changed to copy it somewhere appropriate.

src/terminator/view/JTextBuffer.java: And a method which is called when the middle button is pressed (if one has a middle button) to paste whatever's appropriate, if anything.

src/terminator/view/JTerminalPane.java: I've tidied up the related names too because it's confusing to have methods called plain "copy" and "paste" when there are related methods in the same class which have "copy" in the name. I think when I introduced those names, I was trying to keep a change textually small. That's not necessarily a good indicator of simplicity.

src/terminator/TerminatorMenuBar.java: What's this commented-out pasting code for? Why am I tracking an API change in code which looks like a TODO?


2005-08-17 03:38:45 +0100 / enh / revision 644

src/terminator/InfoDialog.java:
src/terminator/LogWriter.java: cope with an inability to log without resorting to hard-coded Unix and Win32 paths.


2005-08-17 03:34:27 +0100 / enh / revision 643

src/terminator/view/JTerminalPane.java: rather than use getpwnam(3) to find the user's shell, let's just assume it's bash(1). I think that's true for everyone who's using Terminator. (My second choice quick hack would be to use the SHELL environment variable.)


2005-08-16 01:03:06 +0100 / mad / revision 642

native/all/pty/PtyGenerator.h: In an effort to stop the "spurious" window of log messages from annoying simonj, I created a javaw-cygwin.exe, linked with --subsystem windows rather than the default of linking with the console subsystem. This caused terminator's child to die with:

Error from child: dup2(1, STDOUT_FILENO): (No such file or directory)

[Process killed by signal 6.]

This seems to fix it and looks to be consistent with the assumption in the subsequent line - that childFd might be less than 3.


2005-08-15 20:29:10 +0100 / mad / revision 641

src/terminator/view/JTerminalPane.java: Forward slashes work in Win32 too. Someone's bound to miss a backslash if we start down the other road though hopefully this code won't live for long. (cmd.exe's built-in commands like dir and the common control's file picker don't support forward slash directory separators but the Win32 API does and always has.)


2005-08-15 19:35:49 +0100 / enh / revision 640

src/terminator/LogWriter.java:
src/terminator/view/JTerminalPane.java: a couple of changes to replace Unix-specific paths if we're on Win32. Better solutions to these problems are to use JNI for JTerminalPane.getUserShell and write a SinkWriter rather than using a BufferedWriter pointing at /dev/null.


2005-08-15 04:13:05 +0100 / enh / revision 639

src/terminator/terminal/TerminalControl.java:
src/terminator/Terminator.java:
src/terminator/TerminatorFrame.java: use the EventQueue invoke* methods directly.


2005-08-12 12:51:14 +0100 / mad / revision 638

bin/terminator: For some reason, I can't successfully get a "1g" heap on Win32. (I realize I should be pasting the error messages here but they've long since scrolled off and I'm getting tired.) I could put a cygwin-compiled java.exe higher up my path than the Sun one but that doesn't feel like an idea without problems. I'd rather call it java-cygwin.exe and keep things unambiguous.


2005-08-12 11:42:07 +0100 / mad / revision 637

src/terminator/terminal/PtyProcess.java: Re-implement simple versions of FileInputStream and FileOutputStream in my pidgin Java, deferring to JNI methods. Use these PtyI/OStreams if the JNI code declines to return us a FileDescriptor for use, as before, with FileI/OStreams.

native/all/pty/terminator_terminal_PtyProcess.cpp: Implement these in terms of cygwin's read and write syscalls. These implement a substantial fraction of the pseudo-terminal behavior on cygwin, so we have to call the cygwin versions of these calls rather than using the underlying Win32 handles.

This lets me check-in code which (hurrah!) works on cygwin without changing the way the code works on proper operating systems. We could do away with the FileI/OStreams and the FileDescriptor hack. The cygwin-compatible code does work as far as I tested it on Linux. Simply change the (second) #ifdef __CYGWIN__ to #if 1 to try it.

PtyInputStream and PtyOutputStream feel like they ought to be non-nested classes (to me). The only reason I didn't try to do it like that is that I didn't want to have to do any tinkering with the makerules to get multiple JNI classes working in the same DLL. Maybe it'd just work, I don't know, I didn't even try.

The one key ingredient that remains unchecked-in is the cygwin-linked "java.exe" launcher.


2005-08-12 08:44:05 +0100 / mad / revision 636

native/all/pty/terminator_terminal_PtyProcess.cpp: Cygwin's get_osfhandle on the masterFd of the pseudo-terminal gives us a native handle which Java can read from. The trick, which took hours to discover, is that the FileDescriptor structure on the particular Win32 JDK I'm using has an undocumented long field called "handle" which is what it actually uses in preference to the documented int "fd". Cygwin's fhandler_tty.cc shows that it uses two Win32 handles for the master end of the pseudo-terminal. I tried a few methods of extracting the output handle. Several involved getting a copy of the masterFd in STDOUT_FILENO or STDERR_FILENO so that cygwin would do SetStdHandle on the corresponding native slot with the output handle. Another involved adding a get_output_osfhandle entry point to the cygwin DLL (having pretty exhaustively searched in vain for any existing entry point which could be persuaded to leak the information). Both methods showed that the handle had an integer value 4 less than its counterpart - a correspondence which seemed plausible and lent confidence to both methods. However, calling WriteFile on this handle just caused kernel32.dll to crash. I don't understand that, as the code I'm checking in clearly demonstrates (in conjunction with the cygwin-compiled launcher which I haven't checked-in) that it's possible to write() into the masterFd and have the output come out of the slave (and be executed by bash in my example).

Above and beyond its palpable failure to work, its lack of portability and its contravention of Sun's guideline that an application shouldn't create its own FileDescriptors, inspection of the fhandler_tty.cc code suggests that bypassing cygwin's handles isn't going to do what we want anyway. A substantial part of the termios handling is done in the read and write entry points on the masterFd. We're going to have to use cygwin's read and write calls.


2005-08-12 03:33:06 +0100 / enh / revision 635

src/terminator/Terminator.java: initialize the LAF for Terminator like we do for everything else.


2005-08-12 03:31:50 +0100 / enh / revision 634

src/terminator/terminal/PtyProcess.java: improve a few names. (Though leaving the unfortunate class name alone for now.)


2005-08-11 18:32:36 +0100 / mad / revision 633

native/all/pty/terminator_terminal_PtyProcess.cpp: Remove obsolete Win32 stubs. I've worked out how to safely load the cygwin-using version of the pty shared library (with cygwin-1.5.18-1) but it's not useful for terminator's purposes.

For one thing, cygwin's fork runs the original executable again which is expected to notice that it's been run as a fork. java.exe not being linked with cygwin, it doesn't notice, and just produces usage information and quits. The interweb leads me to believe that you can call Java from a C program with JNI. That suggests a possible way round this problem using a cygwin-linked launcher instead of java.exe.

Then there's the matter of what sort of file descriptors JNI's wanting. A goodly few minutes searching on google didn't really leave me any the wiser as to whether it's after Win32 HANDLEs or MSVCRT file descriptors or what.

The cygload example, the cygwin FAQ and how-cygtls-works.txt explain the problem with naively loading a cygwin-using DLL. Well, actually, they explain the problem with naively loading the cygwin1.dll itself. The interweb doesn't show much (any?) interest in loading a cygwin-using DLL. I got around the problem of cygwin overwriting the bottom of the calling stack by creating a shim-pty.dll, compiled with mingw32, which creates a thread with a 4KiB array on the stack then calls Win32's LoadLibrary("pty.dll"). That then lets the Java System.loadLibrary("pty") bind to the DLL without overwriting one of Java's stacks. (I called Thread.sleep between loading the DLLs to wait for this thread to do its business.)

If you want to try a pathological example program like this, beware of the trap I ran into yesterday. cygwin1.dll has a shared memory area which it uses to remember how to subvert new threads into calling its own entry point first. This area is initialized the first time cygwin1.dll is loaded. The initialization requires waiting for a thread to complete. If cygwin1.dll is being loaded out of DLL_PROCESS_ATTACH or as a DLL dependency of another DLL, there's a kernel mutex which prevents threading. So startup deadlocks. The easy answer is to run your pathological example from bash.


2005-08-01 02:25:25 +0100 / enh / revision 632

src/terminator/FindDialog.java:
src/terminator/InfoDialog.java: don't remember the bounds for "Find" or "Info" windows, since FormDialog can't distinguish different instances based on title.


2005-08-01 02:04:11 +0100 / enh / revision 631

src/terminator/FindDialog.java:
src/terminator/InfoDialog.java: track e.forms API change.


2005-07-28 18:04:13 +0100 / enh / revision 630

src/terminator/view/highlight/FindHighlighter.java: when I saw the patch for my last change, I was offended by the asymmetry. Fix that.


2005-07-27 18:18:01 +0100 / enh / revision 629

src/terminator/view/highlight/FindHighlighter.java: simonj complains "Strange that when I delete the search string it seems to still highlight it, but only for new text!", and he's not wrong. An empty search string should cancel the search. (Previously only canceling the dialog with the esc key would cancel the search.)


2005-07-27 02:35:03 +0100 / enh / revision 628

src/terminator/terminal/PtyProcess.java: startProcess shouldn't be public.


2005-07-27 02:30:30 +0100 / enh / revision 627

native/all/pty/terminator_terminal_PtyProcess.cpp:
src/terminator/terminal/PtyProcess.java:
src/terminator/terminal/TerminalControl.java:
src/terminator/view/JTerminalPane.java: "throws RuntimeException" is nonsense, and expecting callers to worry about thread guarantees (especially ones that are a result of a work-around for a broken, out-of-date version of one particular OS) isn't a good idea either. So go back to "throws IOException" (JavaHpp now honors this, so that's what we will actually throw), and use a private ExecutorService to maintain the threading guarantee (even on non-broken OSes). We have to let one implementation detail escape by either declaring that we also throw InterruptedException, or masking this fact by claiming to throw "Exception". The latter seems slightly less distasteful. This cruft should come out when no-one uses Linux 2.4 any longer.


2005-07-26 21:14:36 +0100 / mad / revision 626

src/terminator/terminal/PtyProcess.java: The "throws IOException" specifiers were put in when the native code was throwing IOException. Now the generated proxy is throwing RuntimeException instead. It's useful to fix the specification because RuntimeException isn't checked, unlike IOException, which requires catching everywhere.

This change begs the question of whether any of the code which is explicitly catching IOException should be generalized. All the ones in TerminalControl look OK to me. There are two in JTerminalPane which are currently mandated by other throw specifiers but which might warrant a closer look.

src/terminator/terminal/TerminalControl.java: Wait for the ptyProcess from the same thread which spawned it, making it so that normally exited bash shells have their pane closed on Linux 2.4. Presumably this also broke when Elliott tidied up the handling of WIFSIGNALED and the like. The conditional just below this change suggests that he must have fixed things such that we were correctly noticing a normal exit for the first time. This seems to have exposed a couple of latent issues. (The bug in Linux worked-around here and the bug in this function fixed by the previous change.)

Does this expose us to a potential deadlock? Only if the Swing thread is waiting on the Terminal connection listener, which I don't think it does. I've tested this change with various exit commands on Linux 2.6 and 2.4. It seemed preferable to the symmetric alternative: spawning the ptyProcess on the Terminal connection listener thread. A naive implementation of that exposed various variables to access before initialization.

Another alternative would be to disclaim support for Linux 2.4. If this change causes trouble, that may well be what we'll do. 2.6.11 has been good to me.


2005-07-23 03:46:24 +0100 / mad / revision 625

src/terminator/terminal/TerminalControl.java: We don't understand why this used to work but it's been broken for me at work, on Linux, since roughly the time of the last check-in. Every bash window which exits normally has been hanging around with no visible text but with a cursor and scroll bar.


2005-07-16 22:30:15 +0100 / enh / revision 624

src/terminator/terminal/TerminalControl.java:
src/terminator/view/JTerminalPane.java: tidy up exception handling. The one remaining call to printStackTrace is correct.


2005-07-16 06:37:08 +0100 / enh / revision 623

native/all/pty/terminator_terminal_PtyProcess.cpp:
src/terminator/terminal/PtyProcess.java:
src/terminator/terminal/TerminalControl.java: pay proper attention to how our process actually dies. I was concerned that we weren't doing the right thing even in simple cases, but we were (in simple cases). It turns out that if you run and interrupt "sleep 10" from bash(1), then exit bash with ^D, bash feels the need to communicate the fact of the signal using the usual Unix scheme of returning 128 + WTERMSIG(status), which we then faithfully display. Apple's Terminal behaves the same.


2005-07-13 12:07:46 +0100 / mad / revision 622

native/all/pty/unix_exception.h: Chris's fix for terminator compilation. man errno on my Linux box agrees that errno.h is the right header. The BlueArc style dictates a slightly different placement of the include to Chris's (alphabetic within groups of adjacent headers).


2005-07-09 01:51:10 +0100 / enh / revision 621

src/terminator/TerminatorFrame.java: quantize window resizing.

src/terminator/view/JTerminalPane.java: add missing @Override annotations in similar code.


2005-07-08 23:44:02 +0100 / enh / revision 620

src/terminator/terminal/TerminalControl.java:
src/terminator/TerminatorFrame.java:
src/terminator/view/JTerminalPane.java: add disabled support for using a JAsynchronousProgressIndicator to show that there's been output on other tabs; I modified it to implemen