9fans/plan9port — pull request #1 by jroimartin (2014-11-16 00:12:12+00:00)
Title: Fix devdraw's title and "open in top" on OSX and acme's infinite loop

On OSX 10.10, when you open an application that depends on devdraw, the
title bar only shows the first letter of the application's name. The
patch sets a default title as soon as the window is created, which
fixes this issue.

On OSX 10.10, when you open an application that depends on devdraw, this
application is opened in top of other windows, however the menu bar is
not updated. The patch calls topwin() at the end of makewin() in
src/cmd/devdraw/cocoa-screen.m .

An infinite loop has been detected in libdraw that affects acme. It
can be reproduced following the following steps in acme:
1. Open a new "win"
2. Execute any command, e.g. "ls"
3. Press "ESC"
4. Press left
5. Press "ESC"
6. Press "ESC"
7. Acme freezes up
This patch makes sure that len is greater that 0 in _string() at
/src/libdraw/string.c:81