Skip to content

Commit e18d167

Browse files
committed
同步完成退格键不再进行筛选; v1.3.0;
1 parent b4cc6b0 commit e18d167

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

src/Intellisense/SyncCompletion/IdeographCompletionCommandHandler.cs

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#nullable enable
22
#pragma warning disable VSTHRD010
33

4-
using System.Collections.ObjectModel;
54
using System.Runtime.InteropServices;
65
using ChinesePinyinIntelliSenseExtender.Options;
76
using Microsoft.VisualStudio;
@@ -73,14 +72,12 @@ public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pv
7372
}
7473
}
7574

76-
ReadOnlyCollection<ICompletionSession>? completionSessions = null;
77-
7875
if (nCmdID == (uint)VSConstants.VSStd2KCmdID.RETURN
7976
|| nCmdID == (uint)VSConstants.VSStd2KCmdID.TAB
8077
|| isTypedWhiteSpace
8178
|| isTypedPunctuation)
8279
{
83-
completionSessions ??= _completionBroker.GetSessions(_textView);
80+
var completionSessions = _completionBroker.GetSessions(_textView);
8481
foreach (var completionSession in completionSessions)
8582
{
8683
if (!completionSession.IsDismissed)
@@ -102,24 +99,7 @@ public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pv
10299
}
103100
}
104101

105-
var result = _nextCommandHandler.Exec(ref pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
106-
107-
if (nCmdID == (uint)VSConstants.VSStd2KCmdID.BACKSPACE
108-
|| nCmdID == (uint)VSConstants.VSStd2KCmdID.DELETE)
109-
{
110-
completionSessions ??= _completionBroker.GetSessions(_textView);
111-
112-
foreach (var completionSession in completionSessions)
113-
{
114-
if (!completionSession.IsDismissed)
115-
{
116-
completionSession.Filter();
117-
}
118-
return VSConstants.S_OK;
119-
}
120-
}
121-
122-
return result;
102+
return _nextCommandHandler.Exec(ref pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
123103
}
124104

125105
public int QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText) => _nextCommandHandler.QueryStatus(ref pguidCmdGroup, cCmds, prgCmds, pCmdText);

src/source.extension.vsixmanifest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="ChinesePinyinIntelliSenseExtender.4293B766-9575-4472-B6F0-98BD86737E0D" Version="1.2.4" Language="en-US" Publisher="Stratos" />
4+
<Identity Id="ChinesePinyinIntelliSenseExtender.4293B766-9575-4472-B6F0-98BD86737E0D" Version="1.3.0" Language="en-US" Publisher="Stratos" />
55
<DisplayName>IntelliSense汉语拼音拓展</DisplayName>
66
<Description xml:space="preserve">汉语拼音的IntelliSense拓展。(支持基于 IAsyncCompletionSource 的完成,如: C#、JS等;支持自定义字符映射;)</Description>
77
<MoreInfo>https://github.com/stratosblue/chinesepinyinintellisenseextender</MoreInfo>
88
<Icon>icon.png</Icon>
99
<PreviewImage>icon.png</PreviewImage>
10-
<Tags>pinyin, 拼音, 五笔, input, 输入映射</Tags>
10+
<Tags>pinyin, 拼音, 五笔, input, 输入映射, 表意文字, 表音文字</Tags>
1111
</Metadata>
1212
<Installation>
1313
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0,)">

0 commit comments

Comments
 (0)