Commits

kien committed 3b34cd7 Draft

Update ctrlp.txt [...]

Check and insert the ending slash

Comments (0)

Files changed (3)

autoload/ctrlp.vim

 endf
 
 fu! ctrlp#rmbasedir(items)
-	if a:items != [] && !stridx(a:items[0], s:dyncwd)
-		let idx = strlen(s:dyncwd) + ( s:dyncwd !~ '[\/]$' )
+	let cwd = s:dyncwd.( s:dyncwd !~ '[\/]$' ? s:lash : '' )
+	if a:items != [] && !stridx(a:items[0], cwd)
+		let idx = strlen(cwd)
 		retu map(a:items, 'strpart(v:val, idx)')
 	en
 	retu a:items

autoload/ctrlp/mrufiles.vim

 endf
 
 fu! s:reformat(mrufs)
+	let cwd = getcwd()
+	let cwd .= cwd !~ '[\/]$' ? ctrlp#utils#lash() : ''
 	if {s:re}
-		let cwd = exists('+ssl') ? tr(getcwd(), '/', '\') : getcwd()
+		let cwd = exists('+ssl') ? tr(cwd, '/', '\') : cwd
 		cal filter(a:mrufs, '!stridx(v:val, cwd)')
 	en
-	let cwd = getcwd()
-	let idx = strlen(cwd) + ( cwd !~ '[\/]$' )
+	let idx = strlen(cwd)
 	if exists('+ssl') && &ssl
 		let cwd = tr(cwd, '\', '/')
 		cal map(a:mrufs, 'tr(v:val, "\\", "/")')
   |ctrlp_mruf_relative|.........Show only MRU files in the working directory.
   |ctrlp_mruf_default_order|....Disable sorting.
   |ctrlp_mruf_case_sensitive|...MRU files are case sensitive or not.
-  |ctrlp_mruf_save_on_update|...Save the list to disk whenever it's updated.
+  |ctrlp_mruf_save_on_update|...Save to disk whenever a new entry is added.
 
   Advanced options:
   |ctrlp_open_func|.............Use custom file opening functions.
 <
 
                                                 *'g:ctrlp_mruf_save_on_update'*
-Set this to 0 to disable saving of the MRU list to disk whenever the list is
-updated, saving will then only occur when exiting Vim: >
+Set this to 0 to disable saving of the MRU list to hard drive whenever a new
+entry is added, saving will then only occur when exiting Vim: >
   let g:ctrlp_mruf_save_on_update = 1
 <
 
 ===============================================================================
 CHANGELOG                                                     *ctrlp-changelog*
 
+Before 2012/11/30~
+
     + New options: |g:ctrlp_abbrev|,
                    |g:ctrlp_key_loop|,
                    |g:ctrlp_open_func|,