Skip to content

Re-run command is backed up by one sequence with shell integration #202299

@anthonykim1

Description

@anthonykim1

Tested on MacOS
(Shell integration for Windows Python REPL users are still colorless so could not test for Windows)

With shell integration decoration enabled on Mac and Linux users using Python REPL, I found out pressing re-run via the decoration offered commandline that is one before the appropriate/target commandline.

For example, clicking on decoration on print('hello') should've offered print('hello') after "Do you want to run the command: ", but instead offered a command that is one before.

Screenshot 2024-01-11 at 2 00 04 PM

(When debugging after clicking decoration circle) command.command in the _getCommandAction function seemed to also command that is one before the appropriate/target command.

Screenshot 2024-01-11 at 4 11 03 PM

Debugging with breakpoint on line 479 (

currentCommand.command = this._hooks.isCommandStorageDisabled ? '' : this._terminal.buffer.active.getLine(currentCommand.commandStartMarker.line)?.translateToString(true, currentCommand.commandStartX, currentCommand.commandRightPromptStartX).trim();
) showed empty string for currentCommand.command.

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugterminal-shell-integrationShell integration infrastructure, command decorations, etc.verifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions