Sublime Forum

Any way to fix Cocoa's text fields?!

#1

Cocoa’s text fields are basically broken. If you select text on a Mac, you can choose whether a drag-selection stops at or captures beyond the linefeed (or carriage return) using the simple gesture of selecting down or up on the left or right side of the text view. Windows, however, just selected the trailing linefeed unless your cursor was in one exact location at the end of the line. Clearly inferior.

Then came Mac OS X.

There was some complaining, but Apple’s solution was to expand the tiny target past the linefeed by a few pixels. Fail.

This has bugged me ever since OS X DP2. I’ve looked into fixing this myself but haven’t had the time to really investigate a solution. Thankfully, there are some apps which still use the older gesture (including Safari), but most Cocoa apps which allow you to select text are just a pain in the ass to use. This is especially true with Terminal and iTerm where choosing the trailing linefeed is particularly important.

What would be awesome would be to replace all Cocoa text fields with SublimeText views (or something along those lines) which appear to follow the old Mac gestures for text selection. I see it also supports text dragging, although it doesn’t show the drag item while dragging.

Am I the only one losing hair over this?

0 Likes

#2

(for an example try opening a multi-line text document in TextEdit.app and compare with any Carbon app)

0 Likes