Conversation
chcg
commented
Jun 11, 2015
- Followup of Gwlp 648, Use GWLP_* instead of GWL_* and DWLP_* instead of DWL_* #129 with more intrusive code changes
- Contains further changes necessary for x64 builds in npp code
- added x64 section in npp vcxprj file
- adapted scintilla vcxprj file to be in line with npp one to build from single solution file containing both projects
- further commit adds npps boost regex to scintilla vcxprj file and retrieves boost via nuget
- avoid x64 crashes with user defined lexer, tab resorting
- open issues:
- plenty of compiler warnings for x64 due to data loss by automatic casting of data types
- text is not visible in key shortcut mapper dialog under x64 only, also text is available during debugging and in modify dialog, maybe part of one of the compiler warnings
- influence on plugins
- adapt scintilla, npp boostregex nmakes to be x64 ready
- adapt vs2005 (should be removed according to notepadPlus.vs2005.vcproj #121 ) and vs2015 project files to be in sync with vs2013
…Xileer Torias with comment: Updated the GetWindowLongPtr and SetWindowLongPtrW nIndex reference as per https://msdn.microsoft.com/en-us/library/windows/desktop/ms633585%28v=vs.85%29.aspx and https://msdn.microsoft.com/en-us/library/windows/desktop/ms644898(v=vs.85).aspx This alters the function to be compatible with both x86, and x64 as to simplify future x64 builds.
…ead of reinterpret_cast<LONG> for SetWindowLongPtr
…ngPtrW, SetWindowLongPtrA -> SetWindowLongPtr; GetWindowLongPtrW -> GetWindowLongPtr
…tyle is not available and bitmap buttons are not working correctly
… crashes as bufferid aka buffer * differs from int under x64
…into x64_build_adaptions
2>..\lexers\LexUser.cxx(1406): error C2664: 'void GenerateVector(vvstring &,const char *,char *,int)' : cannot convert argument 3 from 'const wchar_t [3]' to 'char *' 2> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
…n INT_PTR vs. BOOL
…ing as error, as multiple errors show up due to x64 type truncations on assignments
…ons from Debug -> Unicode Debug and Release -> Unicode Release, to hav a consistent look in VS solution Used same ToolsVersion="12.0" and <PlatformToolset>v120_xp</PlatformToolset>
- add boost via nuget package
- build also without SCI_OWNREGEX
There was a problem hiding this comment.
Two things:
std::make_pair(begin, end)is more concise.- Why the C-style casts? Why not
static_cast<int>(begin), static_cast<int>(end)more on this in a second
There was a problem hiding this comment.
more on this in a second
FunctionParser::getInvertZones is called from three places:
FunctionMixParser::parse, declared as:void FunctionMixParser::parse(std::vector<foundInfo> & foundInfos, size_t begin, size_t end, ScintillaEditView **ppEditView, generic_string classStructName)FunctionZoneParser::parse, declared as:void FunctionZoneParser::parse(std::vector<foundInfo> & foundInfos, size_t begin, size_t end, ScintillaEditView **ppEditView, generic_string classStructName)FunctionUnitParser::parse, declared as:void FunctionUnitParser::parse(std::vector<foundInfo> & foundInfos, size_t begin, size_t end, ScintillaEditView **ppEditView, generic_string classStructName)
All three of which are virtually called from FunctionParsersManager::parse, where docLen(end) is an int, that's apparently coerced to an int.
If we change the declaration/definition of FunctionMixParser::parse, FunctionZoneParser::parse, FunctionUnitParser::parse, to accept begin & end as ints, then we can also change FunctionParser::getInvertZones to accept begin & end as ints.
As best as I can tell, many internal function calls (in FunctionMixParser::parse, FunctionZoneParser::parse, and FunctionUnitParser::parse) accept begin & end as ints as they are now, so this won't require any rippling changes. But, we'd avoid all the casting.
There was a problem hiding this comment.
cleaning up this area seems to be a different story, just slightly related to x64, so I just made it compilable and used the casting style from the rest of the file
so I would consider that as a separate PR for cleaning up the plenty of x64 compiler warnings regarding:
warning C4267|C4244: 'Z' : conversion from 'X' to 'Y', possible loss of data
There was a problem hiding this comment.
Fair enough, so long as we don't forget it.
|
The Aside from the core scintilla edits and the FunctionParsersManager casting, everything looks good. |
|
Got the idea from #139, but it is still not clear to me how to integrate it with the nmake build, but from my point of view it is easier to build both parts npp and scilexer from within one VS solution instead of switching to commandline and nmake and dealing with additional boost sources. |
|
Fixed open issue:
|
|
I'm thinking that you might want to squash all of the commits in this Pull Request, as it's getting very big. |
|
there are a multitude of tutorials on squashing commits, but I'm not sure which to suggest. |
|
@milipili I really like how you're using milestones to organize issues & pull requests, but it seems like you were beaten to it? |
|
yep :) I was a bit too careful. But this merge was planned actually. |
update to Scinitlla Release 5.3.6 (https://www.scintilla.org/scintilla536.zip) Released 26 July 2023. Redraw calltip after showing as didn't update when size of new text exactly same as previous. Feature notepad-plus-plus#1486. On Win32 fix reverse arrow cursor when scaled. Bug notepad-plus-plus#2382. On Win32 hide cursor when typing if that system preference has been chosen. Bug notepad-plus-plus#2333. On Win32 and Qt, stop aligning IME candidate window to target. It is now always aligned to start of composition string. This undoes part of feature notepad-plus-plus#1300. Feature notepad-plus-plus#1488, Bug notepad-plus-plus#2391, Feature notepad-plus-plus#1300. On Qt, for IMEs, update micro focus when selection changes. This may move the location of IME popups to align with the caret. On Qt, implement replacement for IMEs which may help with actions like reconversion. This is similar to delete-surrounding on GTK. and Lexilla Release 5.2.6 (https://www.scintilla.org/lexilla526.zip) Released 26 July 2023. Include empty word list names in value returned by DescribeWordListSets and SCI_DESCRIBEKEYWORDSETS. Issue notepad-plus-plus#175, Pull request notepad-plus-plus#176. Bash: style here-doc end delimiters as SCE_SH_HERE_DELIM instead of SCE_SH_HERE_Q. Issue notepad-plus-plus#177. Bash: allow '$' as last character in string. Issue notepad-plus-plus#180, Pull request notepad-plus-plus#181. Bash: fix state after expansion. Highlight all numeric and file test operators. Don't highlight dash in long option as operator. Issue notepad-plus-plus#182, Pull request notepad-plus-plus#183. Bash: strict checking of special parameters ($*, $@, $$, ...) with property lexer.bash.special.parameter to specify valid parameters. Issue notepad-plus-plus#184, Pull request notepad-plus-plus#186. Bash: recognize keyword before redirection operators (< and >). Issue notepad-plus-plus#188, Pull request notepad-plus-plus#189. Errorlist: recognize Bash diagnostic messages. HTML: allow ASP block to terminate inside line comment. Issue notepad-plus-plus#185. HTML: fix folding with JSP/ASP.NET <%-- comment. Issue notepad-plus-plus#191. HTML: fix incremental styling of multi-line ASP.NET directive. Issue notepad-plus-plus#191. Matlab: improve arguments blocks. Add support for multiple arguments blocks. Prevent "arguments" from being keyword in function declaration line. Fix semicolon handling. Pull request notepad-plus-plus#179. Visual Prolog: add support for embedded syntax with SCE_VISUALPROLOG_EMBEDDED and SCE_VISUALPROLOG_PLACEHOLDER. Styling of string literals changed with no differentiation between literals with quotes and those that are prefixed with "@". Quote characters are in a separate style (SCE_VISUALPROLOG_STRING_QUOTE) to contents (SCE_VISUALPROLOG_STRING). SCE_VISUALPROLOG_CHARACTER, SCE_VISUALPROLOG_CHARACTER_TOO_MANY, SCE_VISUALPROLOG_CHARACTER_ESCAPE_ERROR, SCE_VISUALPROLOG_STRING_EOL_OPEN, and SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL were removed (replaced with SCE_VISUALPROLOG_UNUSED[1-5]). Pull request notepad-plus-plus#178.
update to Scinitlla Release 5.3.6 (https://www.scintilla.org/scintilla536.zip) Released 26 July 2023. Redraw calltip after showing as didn't update when size of new text exactly same as previous. Feature notepad-plus-plus#1486. On Win32 fix reverse arrow cursor when scaled. Bug notepad-plus-plus#2382. On Win32 hide cursor when typing if that system preference has been chosen. Bug notepad-plus-plus#2333. On Win32 and Qt, stop aligning IME candidate window to target. It is now always aligned to start of composition string. This undoes part of feature notepad-plus-plus#1300. Feature notepad-plus-plus#1488, Bug notepad-plus-plus#2391, Feature notepad-plus-plus#1300. On Qt, for IMEs, update micro focus when selection changes. This may move the location of IME popups to align with the caret. On Qt, implement replacement for IMEs which may help with actions like reconversion. This is similar to delete-surrounding on GTK. and Lexilla Release 5.2.6 (https://www.scintilla.org/lexilla526.zip) Released 26 July 2023. Include empty word list names in value returned by DescribeWordListSets and SCI_DESCRIBEKEYWORDSETS. Issue notepad-plus-plus#175, Pull request notepad-plus-plus#176. Bash: style here-doc end delimiters as SCE_SH_HERE_DELIM instead of SCE_SH_HERE_Q. Issue notepad-plus-plus#177. Bash: allow '$' as last character in string. Issue notepad-plus-plus#180, Pull request notepad-plus-plus#181. Bash: fix state after expansion. Highlight all numeric and file test operators. Don't highlight dash in long option as operator. Issue notepad-plus-plus#182, Pull request notepad-plus-plus#183. Bash: strict checking of special parameters ($*, $@, $$, ...) with property lexer.bash.special.parameter to specify valid parameters. Issue notepad-plus-plus#184, Pull request notepad-plus-plus#186. Bash: recognize keyword before redirection operators (< and >). Issue notepad-plus-plus#188, Pull request notepad-plus-plus#189. Errorlist: recognize Bash diagnostic messages. HTML: allow ASP block to terminate inside line comment. Issue notepad-plus-plus#185. HTML: fix folding with JSP/ASP.NET <%-- comment. Issue notepad-plus-plus#191. HTML: fix incremental styling of multi-line ASP.NET directive. Issue notepad-plus-plus#191. Matlab: improve arguments blocks. Add support for multiple arguments blocks. Prevent "arguments" from being keyword in function declaration line. Fix semicolon handling. Pull request notepad-plus-plus#179. Visual Prolog: add support for embedded syntax with SCE_VISUALPROLOG_EMBEDDED and SCE_VISUALPROLOG_PLACEHOLDER. Styling of string literals changed with no differentiation between literals with quotes and those that are prefixed with "@". Quote characters are in a separate style (SCE_VISUALPROLOG_STRING_QUOTE) to contents (SCE_VISUALPROLOG_STRING). SCE_VISUALPROLOG_CHARACTER, SCE_VISUALPROLOG_CHARACTER_TOO_MANY, SCE_VISUALPROLOG_CHARACTER_ESCAPE_ERROR, SCE_VISUALPROLOG_STRING_EOL_OPEN, and SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL were removed (replaced with SCE_VISUALPROLOG_UNUSED[1-5]). Pull request notepad-plus-plus#178. Fix notepad-plus-plus#13901, fix notepad-plus-plus#13911, fix notepad-plus-plus#13943, close notepad-plus-plus#13940