Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

En/Disable Block Comment( Ctrl+/ Ctrl+Q ) mismatch #85

Closed
bluenlive opened this issue Nov 23, 2018 · 3 comments
Closed

En/Disable Block Comment( Ctrl+/ Ctrl+Q ) mismatch #85

bluenlive opened this issue Nov 23, 2018 · 3 comments
Labels

Comments

@bluenlive
Copy link

Line Block Comments(Ctrl+/) function is implemented in EditToggleCommentLine() in EditAutoC.c .
and, Block Comment(Ctrl+Q) in EditToggleCommentBlock() in EditAutoC.c .

They are enabled/disabled in MsgInitMenu() in Notepad2.c .

BTW, lexers in the functions seem to mismatch.
I think this should be patched to something like this...

	EnableCmd(hmenu, IDM_EDIT_LINECOMMENT,
		!(i == SCLEX_NULL || i == SCLEX_CIL || i == SCLEX_DIFF || i == SCLEX_FORTRAN || i == SCLEX_HTML || i == SCLEX_NSIS || i == SCLEX_XML));
	EnableCmd(hmenu, IDM_EDIT_STREAMCOMMENT,
		!(i == SCLEX_NULL || i == SCLEX_VBSCRIPT || i == SCLEX_MAKEFILE || i == SCLEX_VB ||
		  i == SCLEX_SQL || i == SCLEX_PERL || i == SCLEX_PYTHON || i == SCLEX_PROPERTIES || i == SCLEX_CONF ||
		  i == SCLEX_POWERSHELL || i == SCLEX_BATCH || i == SCLEX_DIFF || i == SCLEX_BASH || i == SCLEX_TCL ||
		  i == SCLEX_CIL || i == SCLEX_FORTRAN || i == SCLEX_TEXINFO || i == SCLEX_LISP || i == SCLEX_LLVM ||
		  i == SCLEX_NSIS || i == SCLEX_SMALI || i == SCLEX_VHDL || i == SCLEX_VIM ||
		  i == SCLEX_AU3 || i == SCLEX_RUBY || i == SCLEX_CMAKE));

Could you check it please?

@zufuliu
Copy link
Owner

zufuliu commented Nov 24, 2018

HTML and XML has different comment syntax for scripts or styles, not implemented yet.

zufuliu added a commit that referenced this issue Nov 24, 2018
@zufuliu
Copy link
Owner

zufuliu commented Nov 24, 2018

As CSS is still not supported by LexHTML (issue #62), toggle line comment / block comment for CSS style block inside HTML is not works as expected.

@bluenlive
Copy link
Author

bluenlive commented Nov 26, 2018

Thank you.
You're my hero. ;)
I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants