This change fixe issue #5756.
https://github.com/vim/vim/pull/5774
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
It looks that this can close #2188.
@k-takata commented on this pull request.
In vimtutor.bat:
> +call :test_dir %0 %%d +IF NOT ERRORLEVEL 1 GOTO dir_ok⬇️ Suggested change
-call :test_dir %0 %%d -IF NOT ERRORLEVEL 1 GOTO dir_ok + call :test_dir %0 %%d + IF NOT ERRORLEVEL 1 GOTO dir_ok
Indenting would be better.
In vimtutor.bat:
> @@ -10,7 +10,20 @@ :: When that also fails, it uses the English version. :: Use Vim to copy the tutor, it knows the value of $VIMRUNTIME -FOR %%d in (. "%TMP%" "%TEMP%") DO IF EXIST %%d\nul SET TUTORCOPY=%%d\$tutor$ +FOR %%d in (. %TMP% %TEMP%) DO ( +call :test_dir %0 %%d +IF NOT ERRORLEVEL 1 GOTO dir_ok +) + +echo No working directory is found +GOTO end + +:test_dir
How about making the label more explanatory? (e.g. :test_dir_writable
)
Or how about adding a comment?
@adah1972 commented on this pull request.
I just followed the current convention. The other if-blocks are not indented, either. Should I indent just this block?
> @@ -10,7 +10,20 @@ :: When that also fails, it uses the English version. :: Use Vim to copy the tutor, it knows the value of $VIMRUNTIME -FOR %%d in (. "%TMP%" "%TEMP%") DO IF EXIST %%d\nul SET TUTORCOPY=%%d\$tutor$ +FOR %%d in (. %TMP% %TEMP%) DO ( +call :test_dir %0 %%d +IF NOT ERRORLEVEL 1 GOTO dir_ok +) + +echo No working directory is found +GOTO end + +:test_dir
I think changing the label would be clearer. I prefer better names to comments.
@k-takata commented on this pull request.
In vimtutor.bat:
> +call :test_dir %0 %%d +IF NOT ERRORLEVEL 1 GOTO dir_ok
Other if-commands are one-liners, not blocks, so they are not indented.
I think it's better to indent this for-block.
@adah1972 commented on this pull request.
I see that I wrongly regarded some statements below an IF as a block—it is not, as the IF is a GOTO statement...
I'll change.
@k-takata Let me know if there is anything missing.
LGTM