-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
“折叠”的错误("folding" error) #332
Comments
这是一个极为特殊的例子:异常部分是以特殊方式嵌入的且不符合 |
I don't known how this can be fixed (batch file starts code to set the interrupter and ends with content for the interrupter), anothor example (from ActivePerl) D:\Dev\Perl\bin\cpan.bat @rem = '--*-Perl-*--
@echo off
if "%OS%" == "Windows_NT" goto WinNT
perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
:WinNT
perl -x -S %0 %*
if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
if %errorlevel% == 9009 echo You do not have Perl in your PATH.
if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
goto endofperl
@rem ';
#!perl
#line 15
eval 'exec D:\Dev\Perl\bin\perl.exe -S $0 ${1+"$@"}'
if $running_under_some_shell;
#!/usr/local/bin/perl
BEGIN { pop @INC if $INC[-1] eq '.' }
use strict;
use vars qw($VERSION);
... |
L297-L300 in the attachment: for /F "tokens=1,3,4 delims=:" %%a in ("!inioff!") do (
set "inioff=%%~a"
set "base=%%~b"
set /A "size=%%~c" ) Seems 2 "issues" appeared to be improved:
Maybe they are all caused by |
Upstream patch has been committed. |
I need to find more documents before changing Batch lexer (it's different from the one at https://github.com/ScintillaOrg/lexilla) |
Notepa2-mod or other editors does not supports code folding for batch file, you can disable code folding by unchecking menu View -> Show Code Folding. |
I made some local fixes for LexBatch, NSudo.bat now looks good with the update lexer, but it seems a bit hard to fix all bugs:
|
Code folding and variable highlighting bugs fixed by 9a6cea8. |
Good work! for /F "tokens=1,3,4 delims=:" %%a in ("!inioff!") do (
set "inioff=%%~a"
set "base=%%~b"
set /A "size=%%~c" ) The tailing |
Maybe it's not a bug. chcp 65001
for /?
|
Yeah. tricky ... |
https://github.com/zufuliu/notepad2/blob/45ad427788fd7d1c8ec8a64d1c8a61a4a5706f83/scintilla/lexers/LexBatch.cxx#L125-L127 while (IsTildeExpansion(sc.ch) && !(IsBatOp(sc.chNext, false) || IsBatSpec(sc.chNext) || sc.chNext == '.')) {
|
|
All bugs are fixed, feel free to test latest builds. |
我有个bat文件,在里面有一段代码是生成文件,它的“折叠”出现了错误
(I have a BAT file, in which there is a section of code is a generated file, its "folding" error)
图片和文件在下方
(Pictures and files are below)
NSudo.zip
The text was updated successfully, but these errors were encountered: