Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edits fail to validate ranges correctly before applying #6281

Closed
HookyQR opened this issue May 11, 2016 · 1 comment
Closed

Edits fail to validate ranges correctly before applying #6281

HookyQR opened this issue May 11, 2016 · 1 comment
Assignees
Labels
api bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release important Issue identified as high-priority verified Verification succeeded

Comments

@HookyQR
Copy link
Contributor

HookyQR commented May 11, 2016

  • VSCode Version: 1.1
  • OS Version: OSX

Affected beautify for VS Code. HookyQR/VSCodeBeautify#14
Steps to Reproduce:

Create extension and, with a file open with content:

const active = vscode.window.activeTextEditor;
let range = new vscode.Range(0, 0, Number.MAX_VALUE, Number.MAX_VALUE);
active.edit(edit => edit.replace(range,"new"));

Previously (v1.0 and lower) this would replace the file content with "new" as the edit call would validate the range by reducing the infinite end to the end of the file. From version 1.1 (including insider) the infinite end is set to zero instead.

document.validateRange still performs as expected.

I have changed my extension to call validateRange before any edits, but I believe the way the edits worked previously is more logical.

@isidorn isidorn added the api label May 11, 2016
@alexdima alexdima added the candidate Issue identified as probable candidate for fixing in the next release label May 13, 2016
@alexdima alexdima added this to the May 13th Stable Recovery milestone May 13, 2016
@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority labels May 13, 2016
@alexdima
Copy link
Member

@HookyQR Thank you very much for the heads up, we will be including this fix in 1.1.1

@alexdima alexdima assigned jrieken and unassigned alexdima May 13, 2016
@jrieken jrieken added the verified Verification succeeded label May 13, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release important Issue identified as high-priority verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants