Opened 12 years ago

Closed 10 years ago

#155 closed defect (fixed)

Copying previous input in listener not quite right

Reported by: gz Owned by: mikel
Priority: major Milestone: Cocoa IDE v1
Component: IDE Version:
Keywords: funded Cc:

Description

Reported by Ron Garret in openmcl-devel:

  1. Clicking on a previous input in the listener and hitting "return"

copies the entire input sexpr instead of just the one corresponding to the current selection. And clicking on previous output and hitting return or enter does nothing unless the output is actually selected.

Change History (7)

comment:1 Changed 10 years ago by jaj

  • Keywords funded added
  • Milestone set to Cocoa IDE v1

comment:2 Changed 10 years ago by gz

  • Owner gb deleted

comment:3 Changed 10 years ago by mikel

  • Owner set to mikel
  • Status changed from new to assigned

comment:4 Changed 10 years ago by mikel

  • Resolution set to fixed
  • Status changed from assigned to closed

Added code to balanced-expressions-in-region: previously, if it tried to move forward by a form and failed, it gave up and returned nil (meaning the forms in the input region were not balanced). In that situation, it now tries to move forward by a line comment before giving up.

comment:5 Changed 10 years ago by mikel

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:6 Changed 10 years ago by mikel

  • Status changed from reopened to new

Had two tickets open in Trac, closed the wrong one.

comment:7 Changed 10 years ago by mikel

  • Resolution set to fixed
  • Status changed from new to closed

Fixed. Here's the new behavior (also in the check-in comment):

Cases:

  1. Point is at the prompt: if a balanced expression is at the prompt, we send it to the Lisp. (The test for a balanced expression now skips over line-comments; this means that the comment gets added to the input history, for better or worse)
  1. Point is not at the prompt, but is somewhere in previous output. No selection is active. Copy the previous output to the input area and then do (1)
  1. Point is in previous output, with no selection. Search left and right for a well-formed s-expression. If at least one is found, copy the nearest found s-expression to the prompt, then do (1)
  1. Point is in previous input or output, and a selection is active. Copy the selected text to the prompt and do (1).

If more than one balanced expression is at the prompt, all get evaluated.

If at least one balanced expression is at the prompt, and at least unbalanced expression, none gets evaluated.

Note: See TracTickets for help on using tickets.