atom / symbols-view

Jump to symbols in Atom
MIT License
165 stars 115 forks source link

LaTeX symbols fail in several ways #207

Open karljs opened 7 years ago

karljs commented 7 years ago

Prerequisites

Description

Using Symbols View: Toggle File Symbols in a LaTeX file produces some output but depending on the whitespace and comments surrounding the sections and subsections, the symbol list is often incomplete and what does show up is often incorrectly located.

First, sections and subsections seem to be randomly omitted from the list of symbols. I originally thought this was related to whitespace surrounding the section declarations, but I am no longer sure what is causing this.

Second, the line number that corresponds to the symbols is incorrect and seems to be too high in the file. From what I can tell, it locates the preceding non-whitespace/non-comment line. So, if I have a section, then some commented out text, then another section, it will locate the latter section above the commented out text, which is obviously incorrect.

Steps to Reproduce

  1. Open any LaTeX file with multiple section and/or subsections
  2. Try to locate symbols in the file
  3. Notice that the behavior is incorrect

Expected behavior: Sections and subsections are correctly located regardless of surrounding whitespace.

Actual behavior: Sections are only correctly located when they are not surrounded by whitespace on either side.

Reproduces how often: Always

Versions

Atom 1.12.9 on OSX 10.12.2

~/ atom --version
Atom    : 1.12.9
Electron: 1.3.13
Chrome  : 52.0.2743.82
Node    : 6.5.0
~/ apm --version
apm  1.12.9
npm  3.10.5
node 4.4.5
python 2.7.13
git 2.11.0