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

When searching for root line num, stop at the end of the file. #1015

Merged
merged 2 commits into from
Jul 4, 2019

Conversation

PhilRunninger
Copy link
Member

@PhilRunninger PhilRunninger commented Jul 4, 2019

When using the following NERDTreeStatusLine, Vim would lock up and not
work anymore. The problem was that when trying to find the root line
number, the loop was continuing past the end of the file, looping
"forever". The fix was to simply stop at the end of the file.

let g:NERDTreeStatusline = "%{exists('g:NERDTreeFileNode')&&" .
\ "has_key(g:NERDTreeFileNode.GetSelected(),'path')?" .
\ "g:NERDTreeFileNode.GetSelected().path.getLastPathComponent(0):''}"

Description of Changes

Closes #467


New Version Info

  • Derive a new version number. Increment the:
    • MAJOR version when you make incompatible API changes
    • MINOR version when you add functionality in a backwards-compatible manner
    • PATCH version when you make backwards-compatible bug fixes
  • Update CHANGELOG.md, following this format/example:
    #### MAJOR.MINOR...
    - **.PATCH**: PR Title (Author) #PR Number
    
    #### 5.1...
    - **.1**: Update Changelog and create PR Template (PhilRunninger) #1007
    - **.0**: Too many changes for one patch...
    

When using the following NERDTreeStatusLine, Vim would lock up and not
work anymore. The problem was that when trying to find the root line
number, the loop was continuing past the end of the file, looping
"forever". The fix was to simply stop at the end of the file.

let g:NERDTreeStatusline = "%{exists('g:NERDTreeFileNode')&&" .
      \ "has_key(g:NERDTreeFileNode.GetSelected(),'path')?" .
      \ "g:NERDTreeFileNode.GetSelected().path.getLastPathComponent(0):''}"
@PhilRunninger PhilRunninger merged commit 89a1a43 into master Jul 4, 2019
@PhilRunninger PhilRunninger deleted the 467 branch July 4, 2019 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vim hangs with custom statusline in Windows
1 participant