Skip to content

Commit 859b600

Browse files
oleg.shilooleg.shilo
authored andcommitted
- Fixed failed refresh of suggestion list on editing code while suggestion is displayed
1 parent dde8b49 commit 859b600

File tree

2 files changed

+29
-57
lines changed

2 files changed

+29
-57
lines changed

bin/package.readme

Lines changed: 7 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
1.a Update Resources\WhatsNew.txt
22
1.b Build Release
33

4-
2. Run ..\src\package.cmd
4+
2. Run ..\bin\package.cmd
55

66
3. Commit the code but exclude (latest_version.txt)
77

@@ -14,59 +14,21 @@
1414
Last release stats:
1515
https://tooomm.github.io/github-release-stats/?username=oleg-shilo&repository=cs-script.npp
1616

17-
x64e
1817
---------------------------------
1918
6. Update N++ Plugin Manager
20-
- GitHub steps
21-
1. Clone your fork:
22-
```
23-
git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
24-
```
25-
2. Add remote from original repository (https://github.com/bruderstein/npp-plugins-x64.git) in your forked repository:
26-
```
27-
cd into/cloned/fork-repo
28-
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
29-
git fetch upstream
30-
```
31-
3. Updating your fork from original repo to keep up with their changes:
32-
```
33-
git pull upstream master
34-
```
35-
36-
37-
---------------------
38-
to ensure the same heads between two repositories
39-
git remote add upstream https://github.com/bruderstein/npp-plugins-x64.git
40-
git fetch upstream
41-
git checkout master
42-
git reset --hard upstream/master
43-
git push origin master --force
44-
---------------------
19+
---------------------
4520
certUtil -hashfile .\CSScriptNpp\CSScriptNpp.dll MD5
4621
---------------------
4722

4823
- TortoiceGI steps (alternative):
49-
Pull into Projects\NppPluginManager\npp-plugins-x64 from https://github.com/bruderstein/npp-plugins-x64
50-
git.exe pull --progress -v --no-rebase "https://github.com/bruderstein/npp-plugins-x64" master
24+
Pull into <>\nppPluginList\src from https://github.com/notepad-plus-plus/nppPluginList
25+
git.exe pull --progress -v --no-rebase "https://github.com/notepad-plus-plus/nppPluginList" master
5126

5227
!!!!! iserting 'pull -Xtheirs` ensures that local changes are not merged but overwritten by the remote master
5328

54-
- Update npp-plugins-x64\plugins\plugins64.xml
55-
- Update npp-plugins-x64\plugins\validate.json
56-
- Commit and Push to origin
29+
- Update nppPluginList\src\pl.x64.json
30+
- Update nppPluginList\src\pl.x86.json
31+
- Commit and Push to originprojects
5732
- Create PR from https://github.com/oleg-shilo/npp-plugins-x64
5833

59-
x86
60-
---------------------------------
61-
6. Upload (FTP):
62-
// CSScriptNpp.<version>.7z
63-
// CSScriptNpp.<version>.msi
64-
CSScriptNpp.<version>.zip
65-
CSScriptNpp.<version>.Releaseinfo.txt
66-
CSScriptNpp.<version>.ReleaseNotes.txt
67-
CSScriptNpp.<version>.ReleaseNotes.html
68-
latest_version.txt
69-
latest_version_dbg.txt
7034

71-
7. Update N++ Plugin Manager
72-
https://npppm.bruderste.in/

src/CSScriptIntellisense/Plugin.cs

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,19 @@ static public void CommandMenuInit(ref int cmdIndex, SetMenuCommand setCommand)
9797
foreach (var key in keysToIntercept)
9898
KeyInterceptor.Instance.Add(key);
9999

100-
KeyInterceptor.Instance.Add(Keys.Up);
101-
KeyInterceptor.Instance.Add(Keys.Down);
102-
KeyInterceptor.Instance.Add(Keys.Right);
103-
KeyInterceptor.Instance.Add(Keys.Left);
104-
KeyInterceptor.Instance.Add(Keys.Tab);
105-
KeyInterceptor.Instance.Add(Keys.R);
106-
KeyInterceptor.Instance.Add(Keys.Return);
107-
KeyInterceptor.Instance.Add(Keys.Escape);
108-
KeyInterceptor.Instance.Add(Keys.Z);
100+
KeyInterceptor.Instance
101+
.Add(Keys.Up,
102+
Keys.Down,
103+
Keys.Right,
104+
Keys.Left,
105+
Keys.Tab,
106+
Keys.R,
107+
Keys.Return,
108+
Keys.Escape,
109+
Keys.Z,
110+
Keys.Back,
111+
Keys.Delete);
112+
109113
KeyInterceptor.Instance.KeyDown += Instance_KeyDown;
110114
}
111115
else
@@ -250,6 +254,13 @@ static void Instance_KeyDown(Keys key, int repeatCount, ref bool handled)
250254
}
251255
}
252256

257+
if (key == Keys.Back || key == Keys.Delete)
258+
{
259+
// a character on the left has been erased so the suggestion can be different now
260+
if (autocompleteForm != null && autocompleteForm.Visible)
261+
Dispatcher.Schedule(100, ShowSuggestionList);
262+
}
263+
253264
if (key == Keys.R && isScriptDoc)
254265
{
255266
Modifiers modifiers = KeyInterceptor.GetModifiers();
@@ -1148,7 +1159,7 @@ static public void OnAutocompleteKeyPress(char keyChar = char.MinValue, bool all
11481159
{
11491160
if (hint != null)
11501161
{
1151-
//Debug.WriteLine("Autocomplete hint: " + hint);
1162+
// Debug.WriteLine("Autocomplete hint: " + hint);
11521163
autocompleteForm.FilterFor(hint);
11531164
}
11541165
else
@@ -1235,8 +1246,7 @@ static public void OnCharTyped(char c)
12351246
}
12361247
else if (autocompleteForm != null && autocompleteForm.Visible)
12371248
{
1238-
if (c >= ' ' || c == 8) //8 is backspace
1239-
OnAutocompleteKeyPress(c);
1249+
OnAutocompleteKeyPress(c);
12401250
}
12411251
else
12421252
SourceCodeFormatter.OnCharTyped(c);

0 commit comments

Comments
 (0)