+ fix: issue regarding "Auto Complete Word" feature

+ chg: more prep Scintilla "Position" value type changes for large file support
This commit is contained in:
Rainer Kottenhoff 2018-03-15 21:20:10 +01:00
parent e8bd4f818c
commit ccf0d4471a
4 changed files with 258 additions and 274 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2477,7 +2477,7 @@ void MsgInitMenu(HWND hwnd,WPARAM wParam,LPARAM lParam)
bool bIsHLink = FALSE;
if ((bool)SendMessage(g_hwndEdit, SCI_STYLEGETHOTSPOT, Style_GetHotspotStyleID(), 0))
{
bIsHLink = (Style_GetHotspotStyleID() == (int)SendMessage(g_hwndEdit, SCI_GETSTYLEAT, SendMessage(g_hwndEdit, SCI_GETCURRENTPOS, 0, 0), 0));
bIsHLink = (Style_GetHotspotStyleID() == (int)SendMessage(g_hwndEdit, SCI_GETSTYLEAT, SciCall_GetCurrentPos(), 0));
}
EnableCmd(hmenu, CMD_OPEN_HYPERLINK, bIsHLink);

View File

@ -109,19 +109,24 @@ DeclareSciCallV0(Paste, PASTE);
DeclareSciCallV0(Clear, CLEAR);
DeclareSciCallV0(CopyAllowLine, COPYALLOWLINE);
DeclareSciCallV0(LineDelete, LINEDELETE);
DeclareSciCallV2(CopyText, COPYTEXT, DocPos, length, LPCCH, text);
DeclareSciCallV2(GetTextFromBegin, GETTEXT, DocPos, length, LPCCH, text);
DeclareSciCallV2(CopyText, COPYTEXT, DocPos, length, const char*, text);
DeclareSciCallV2(GetTextFromBegin, GETTEXT, DocPos, length, const char*, text);
DeclareSciCallV2(SetSel, SETSEL, DocPos, anchorPos, DocPos, currentPos);
DeclareSciCallV0(SelectAll, SELECTALL);
DeclareSciCallR01(GetSelText, GETSELTEXT, DocPos, LPCCH, text);
DeclareSciCallV01(ReplaceSel, REPLACESEL, LPCCH, text);
DeclareSciCallR01(GetSelText, GETSELTEXT, DocPos, const char*, text);
DeclareSciCallV01(ReplaceSel, REPLACESEL, const char*, text);
DeclareSciCallR2(GetLine, GETLINE, DocPos, DocLn, line, const char*, text);
DeclareSciCallV2(InsertText, INSERTTEXT, DocPos, position, const char*, text);
DeclareSciCallR0(GetTargetStart, GETTARGETSTART, DocPos);
DeclareSciCallR0(GetTargetEnd, GETTARGETEND, DocPos);
DeclareSciCallV0(TargetFromSelection, TARGETFROMSELECTION);
DeclareSciCallV2(SetTargetRange, SETTARGETRANGE, DocPos, start, DocPos, end);
DeclareSciCallV2(ReplaceTarget, REPLACETARGET, DocPos, length, LPCCH, text);
DeclareSciCallV2(ReplaceTarget, REPLACETARGET, DocPos, length, const char*, text);
DeclareSciCallV2(AddText, ADDTEXT, DocPos, length, const char*, text);
DeclareSciCallV1(SetAnchor, SETANCHOR, DocPos, position);
DeclareSciCallV1(SetCurrentPos, SETCURRENTPOS, DocPos, position);
@ -147,8 +152,9 @@ DeclareSciCallR1(DocLineFromVisible, DOCLINEFROMVISIBLE, DocLn, DocLn, line);
DeclareSciCallR1(GetLineIndentPosition, GETLINEINDENTPOSITION, DocPos, DocLn, line);
DeclareSciCallR2(GetRangePointer, GETRANGEPOINTER, LPCCH, DocPos, start, DocPos, length);
DeclareSciCallR0(GetCharacterPointer, GETCHARACTERPOINTER, LPCCH);
DeclareSciCallR2(GetRangePointer, GETRANGEPOINTER, const char*, DocPos, start, DocPos, length);
DeclareSciCallR0(GetCharacterPointer, GETCHARACTERPOINTER, const char*);
DeclareSciCallV1(SetVirtualSpaceOptions, SETVIRTUALSPACEOPTIONS, int, options);

View File

@ -17,16 +17,27 @@
#include <stdbool.h>
#include "Sci_Position.h"
//~#define NP3_COMPILE_TEST 1
#if defined(SCI_LARGE_FILE_SUPPORT)
typedef Sci_Position DocPos;
typedef Sci_PositionCR DocPosCR;
typedef int DocLn; // Sci_Line?
typedef Sci_Position DocPos;
typedef Sci_PositionU DocPosU;
typedef Sci_PositionCR DocCR;
typedef Sci_Position DocLn; // Sci_Line?
#else
typedef int DocPos;
//typedef ptrdiff_t DocPos; // compile test
typedef long DocPosCR;
typedef int DocLn;
//typedef ptrdiff_t DocLn; // compile test
#ifdef NP3_COMPILE_TEST
typedef ptrdiff_t DocPos;
typedef size_t DocPosU;
typedef long DocPosCR;
typedef ptrdiff_t DocLn;
#else
typedef int DocPos;
typedef unsigned int DocPosU;
typedef long DocPosCR;
typedef int DocLn;
#endif
#endif