Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tyru
Copy link

@tyru tyru commented Jul 21, 2019

This added test case is failed at 8.1.1726.

func Test_let_heredoc_trim_no_indent_marker()
  let text =<< trim END
  Text
  with
  indent
END
  call assert_equal(['Text', 'with', 'indent'], text)
endfunc

Because :function failed to find marker with "no indent".
It works when outside :function.

  let text =<< trim END
  Text
  with
  indent
END

@tyru
Copy link
Author

tyru commented Jul 21, 2019

@brammool
I think this behavior should be written in help explicitly.
Or if this is unexpected behavior (require same indent with trim ?), it should be written also.

I will write help too after confirming this behavior is expected or not expected.

@tyru
Copy link
Author

tyru commented Jul 21, 2019

Sorry, I think the pull request comment is not enough.
It occurs when trim flag AND no indent marker at the end.

@codecov-io
Copy link

Codecov Report

Merging #4713 into master will increase coverage by <.01%.
The diff coverage is 90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4713      +/-   ##
==========================================
+ Coverage   81.37%   81.37%   +<.01%     
==========================================
  Files         115      115              
  Lines      145250   145255       +5     
==========================================
+ Hits       118195   118204       +9     
+ Misses      27055    27051       -4
Impacted Files Coverage Δ
src/userfunc.c 88.14% <90%> (+0.03%) ⬆️
src/viminfo.c 73.78% <0%> (-1.34%) ⬇️
src/gui_beval.c 62.5% <0%> (-0.87%) ⬇️
src/if_xcmdsrv.c 85.63% <0%> (-0.54%) ⬇️
src/window.c 87.33% <0%> (-0.04%) ⬇️
src/os_unix.c 63.35% <0%> (+0.04%) ⬆️
src/gui.c 63.7% <0%> (+0.05%) ⬆️
src/gui_gtk_x11.c 57.96% <0%> (+0.09%) ⬆️
src/ui.c 69.66% <0%> (+0.97%) ⬆️

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 defa067...e9402f8. Read the comment docs.

@brammool brammool closed this in ecaa75b Jul 21, 2019
manuelschiller pushed a commit to manuelschiller/vim that referenced this pull request Nov 10, 2019
Problem:    Heredoc with trim not properly handled in function.
Solution:   Allow for missing indent. (FUJIWARA Takuya, closes vim#4713)
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.

2 participants