mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
Make the behavior of window splits consistent (#1035)
* add option to spawn split from previous window * Update some comments and remove debugging statement. * Simplify the code, and make it respect NERDTreeWinPos and 'splitbelow'. * Better logic for getting NERDTree window number when not active window. * Use common functions for splitting windows. Make splitting respect user. The placement of split windows now respects the user's choices for the splitright and splitbelow settings, and the g:NERDTreeWinPos variable. * Update version number in change log.
This commit is contained in:
@@ -4,6 +4,11 @@ endif
|
||||
let g:loaded_nerdtree_autoload = 1
|
||||
|
||||
let s:rootNERDTreePath = resolve(expand("<sfile>:p:h:h"))
|
||||
|
||||
"FUNCTION: nerdtree#version(...) {{{1
|
||||
" If any value is given as an argument, the entire line of text from the
|
||||
" change log is shown for the current version; otherwise, only the version
|
||||
" number is shown.
|
||||
function! nerdtree#version(...)
|
||||
let l:changelog = readfile(join([s:rootNERDTreePath, "CHANGELOG.md"], nerdtree#slash()))
|
||||
let l:text = 'Unknown'
|
||||
@@ -22,6 +27,7 @@ endfunction
|
||||
" SECTION: General Functions {{{1
|
||||
"============================================================
|
||||
|
||||
"FUNCTION: nerdtree#slash() {{{2
|
||||
function! nerdtree#slash()
|
||||
|
||||
if nerdtree#runningWindows()
|
||||
@@ -49,7 +55,6 @@ function! nerdtree#and(x,y)
|
||||
if (l:x % 2) && (l:y % 2)
|
||||
let l:result += float2nr(pow(2, l:n))
|
||||
endif
|
||||
echomsg l:x . ", " . l:y . " => " l:result
|
||||
let l:x = float2nr(l:x / 2)
|
||||
let l:y = float2nr(l:y / 2)
|
||||
let l:n += 1
|
||||
|
||||
Reference in New Issue
Block a user