You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Saving an edit with async mode sometimes chops of the first character.
Happens when searching entire moderately sized projects and editing many files. Examples:updating Javascript Versions in HTML files or includes in PHP Files
See the How to Recreate section
Things about your system and environment(请在此填写你的系统信息)
field
value
os
Windows 10 Pro 21H1
vim
Vim 8.2 Included patches: 1-12
backend
ag 2.2.5
locale
C.UTF-8
vimrc:
" CtrlSF" let g:ctrlsf_debug_mode = 1" Maps -> Ctrl F . Letternmap<C-F>f<Plug>CtrlSFPromptvmap<C-F>f<Plug>CtrlSFVwordPathvmap<C-F>F<Plug>CtrlSFVwordExecnmap<C-F>n<Plug>CtrlSFCwordPathnmap<C-F>p<Plug>CtrlSFPwordPathnnoremap<C-F>o:CtrlSFOpen<CR>nnoremap<C-F>t:CtrlSFToggle<CR>inoremap<C-F>t<Esc>:CtrlSFToggle<CR>" Default Regex on" let g:ctrlsf_regex_pattern = 1" Don't be hanginletg:ctrlsf_search_mode='async'
Log:
No Logs
How to Recreate:
Create an Empty Folder and Run this Shell Script in it (Replicating project size)
End might need to be tweaked if you've got a super PC, async needs to render results in multiple batches.
File type doesn't matter, but php/html shows the issue well
#!/bin/sh
TEXT="<?php\n<!DOCTYPE html>\n<meta charset=\"utf-8\">\n<html lang=\"en\">\n<head>\n<title>Test</title>\n</head>\n?>"
START=1
END=55
for(( c=$START; c<=$END; c))doecho -e $TEXT>${c}_tmp.php
done((END=END1))
ENDTEXT="<?php\n<!DOCTYPE html>\n<meta charset=\"utf-8\">\n<html lang=\"en\">\n<head>\n<title>Last</title>\n</head>\n<head>\n\t<div class=\"nav\">\n\t\t<h1>ctrlsf bug Example</h1>\n\t</div>\n\t<hr>\n\t<div class=\"contents\">\n\t\t<p>\n\t\t\tSomewhere above this results the tab amount will change from 4 to 5.\n\t\t\tSearch: \"Test\"\n\t\t</p>\n\t</div>\n</head>\n?>"echo -e $ENDTEXT>${END}_tmp.php
Search the files in the folder using this: CTRLSF Test -filetype php
Before continuing, search 5 spaces in the results buffer
This will show you the underlying issue / reason
Note: All files but the last are the same
Edit using: %s/Test/test/ Save&Write
Re-Search using: CTRLSF test -filetype php
Higher up results should be missing the first character
Issue description
Saving an edit with async mode sometimes chops of the first character.
Happens when searching entire moderately sized projects and editing many files.
Examples: updating Javascript Versions in HTML files or includes in PHP Files
See the
How to Recreate
sectionThings about your system and environment(请在此填写你的系统信息)
No Logs
How to Recreate:
Search the files in the folder using this:
CTRLSF Test -filetype php
Before continuing, search 5 spaces in the results buffer
Edit using:
%s/Test/test/
Save&WriteRe-Search using:
CTRLSF test -filetype php
Before Edit
After Edit
Note: rerunning the Shell Script resets files to the original (Good for debugging!)
Reason:
ctrlsf#db#MaxLnum()
changing mid-search not updating already rendered matchesx
results, with max length 7, rendering with the default 4 spaces.My Solution:
The text was updated successfully, but these errors were encountered: