REditorSupport / REditorSupport/vscode-R

Reindent Lines commands don't work

Offen
#435 9 Kommentare 2 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@andycraig arbeitet bereits daran.

Seit 03.11.2020.

bug
Vorherrschende Sprache
TypeScript
Sterne
1.2k
Forks
139
Ø Merge
2 Std. 46 Min.
Gemergte PRs (30 T.)
5

Beschreibung

Describe the bug

Commands Reindent Lines, Reindent Selected Lines do nothing.

To Reproduce

  1. Create a file temp.R with the following content:
    for(i in 1:2) {
    print(i)
    }
    
  2. Use command Reindent Lines; nothing happens
  3. Select all lines
  4. Use command Reindent Selected Lines; nothing happens

Contrast with JavaScript:

  1. Create a file temp.js with the following content:
    for (let index = 0; index < array.length; index++) {
    const element = array[index];   
    }
    
  2. Use command Reindent Lines; middle line is indented as expected

EDIT: For Javascript, it also works if only lines 2-3 are selected and the Reindent Selected Lines command is used.

Notes

Not sure if this is a vscode-R bug or a VS Code bug, as there seem to be quite a few VS Code issues related to reindenting, e.g., https://github.com/microsoft/vscode/issues/19847

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.