FYI: I've implemented support in the DomTerm terminal emulator (http://domterm.org) for moving the cursor by clicking the mouse. This works by Domterm calculating the "distance" between the clicked position and current cursor position, and sending the corresponding number of arrow-key events.
No readline changes were needed - in fact the feature works for any application or library that maps arrow key events to cursor motion. Since Domterm doesn't know which programs that is, you can "enable" the feature in one of two ways: - Set the prompt string appropriately, as specified here: http://domterm.org/Tips.html#bash-shell-prompt This enables what I call "readline mode" in the current input line. - "Force" cursor motion mode by pressing Alt while clicking. Wrapped lines (lines wider than the terminal width) work. Middle-click paste also works. Some readline alternatives (such as JLine3) have the option of enabling mouse click reporting. However, doing so has some annoying downsides, as it disables (or requires the application to handle) features such right-button context menu; text selection; scroll button support. I think it works much better to only handle left clicks (and middle-button paste) in the input area, which leaving other mouse operations to the default. I hope you try out DomTerm - it's a pretty nice terminal emulator is other ways too. -- --Per Bothner [email protected] http://per.bothner.com/ _______________________________________________ Bug-readline mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-readline
