Skip to content

Error when trying to clear all postemptive spaces #580

@user9713

Description

@user9713

Describe the bug

Attempting to clear all postemptive spaces results in the error displayed in the screenshot

To Reproduce
Steps to reproduce the behavior:

  1. Enter a few newlines in your lua script on VSCode
  2. The ellipses should appear to indicate that there's a line with empty spaces
  3. Right click on the ellipses and select "Clear all postemptive spaces"

In the output console, the following message is displayed:

script\core\command\removeSpace.lua:26: attempt to call a nil value (field 'lineContent')
stack traceback:
	[C]: in function 'xpcall'
	script\proto\proto.lua:143: in function <script\proto\proto.lua:122>
[Error - 2:05:10 AM] Request workspace/executeCommand failed.
  Message: [02:05:11.816][error][#0]: script\core\command\removeSpace.lua:26: attempt to call a nil value (field 'lineContent')
stack traceback:
	[C]: in function 'xpcall'
	script\proto\proto.lua:143: in function <script\proto\proto.lua:122>

  Code: -32603 

Expected behavior
The empty spaces should be removed throughout all of the lua script

Screenshots
image

Environment (please complete the following information):

  • OS: Windows
  • Client: VSCode

Provide logs
service.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions