Forums » Development »
letting dl delete the last character in a line
Added by Martin DeMello almost 13 years ago
The sequence of events is:
YModePool:Appending to input buffer d YModeCommand:ExecCommand( view, , inputs='d') YModeCommand:YCommand* YModeCommand::parseCommand(const YKeySequence&, const YKey*&):322 YModePool:CmdState = CmdOperatorPending YSession:sendKey( true , key=l) YModePool:Looking mappings for dl YModePool:Appending to input buffer l YModeCommand:ExecCommand( view, , inputs='dl') YModeCommand:YCommand* YModeCommand::parseCommand(const YKeySequence&, const YKey*&):322 YZAction:YZAction::deleteArea [(line,col)=(0,1)<==============>[(line,col)=(0,1)
This is even arguably the correct behaviour; since the cursor doesn't move, nothing should get deleted. However, vim does delete the character, and the following test seems to depend on it being deleted:
-- Cmd with registers clearBuffer() sendkeys("i12<ESC>0") sendkeys("\"adl") sendkeys("\"bdl") assertEquals( bufferContent(), "")
Should it be specialcased in deleteArea? Or possibly in del ("if we get an empty interval, and the movement command was "right", then extend the interval by one character).
I'm brand new to this, so I'm not sure what else that could potentially break.