rhysd / clever-f.vim

Extended f, F, t and T key mappings for Vim.
https://rhysd.github.io/clever-f.vim
1.01k stars 44 forks source link

Fix direct-marker error when line is empty #55

Closed matsui54 closed 4 years ago

matsui54 commented 4 years ago

problem

When g:clever_f_mark_direct=1 and the line that the cursor is on is empty, an error like this is thrown.

Error detected while processing function clever_f#find_with:
line   71:
E121: Undefined variable: direct_markers

Checking into the code, this problem is caused by range() function error(E727) in s:mark_direct() because the column number is larger than len(getline('.')) when the line is empty.

codecov-commenter commented 4 years ago

Codecov Report

Merging #55 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #55   +/-   ##
=======================================
  Coverage   94.44%   94.44%           
=======================================
  Files           2        2           
  Lines         324      324           
=======================================
  Hits          306      306           
  Misses         18       18           
Impacted Files Coverage Δ
autoload/clever_f.vim 94.35% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c9c444d...feaecec. Read the comment docs.