Closed Bug 487569 Opened 16 years ago Closed 16 years ago

command "insert" doesn't work in editor.

Categories

(Skywriter Graveyard :: Command Line, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: ohdarling88, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729) Build Identifier: chageset 280eec4d2b02 in frontend/js/bespin/cmd/commands.js, command 'insert' used a undefined variable self.editor.cursorPosition, it can be fixed by replace it with 'getCursorPos()': self.editor.model.insertChunk(self.editor.cursorPosition, text); => self.editor.model.insertChunk(self.editor.getCursorPos(), text); Reproducible: Always Steps to Reproduce: 1. open a file 2. jump to command line 3. run command 'insert blabla'
I'm confirming this, because it's a valid concern. The fix you suggested was committed in changeset 25bd449d3aa5. However, that fix was incorrect, as model's insertChunk() is expecting modelPos, not cursor's pos. I've applied the correct fix in my repo, changeset 5f3a1c8a5240: http://bitbucket.org/gphemsley/bespin/changeset/5f3a1c8a5240/
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
Whiteboard: commandline
Version: unspecified → Trunk
This is a mass migration from Mozilla Labs :: Bespin to Bespin :: Command Line.
Component: Bespin → Command Line
Product: Mozilla Labs → Bespin
QA Contact: bespin → command.line
Target Milestone: -- → ---
Whiteboard: commandline
gordon, was this fixed?
Well, the changeset I mentioned in comment 1 was indeed pulled into tip at some point, but the 'insert' command does not appear to exist anymore.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.