Skip to content

Commit

Permalink
fix menu checkmark bug
Browse files Browse the repository at this point in the history
  • Loading branch information
VinsWorldcom committed Nov 20, 2022
2 parents dceff47 + e3d21ff commit 8f79300
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion NppMarkdownPanel/Forms/MainResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
<data name="AboutDialogText" xml:space="preserve">
<value>MarkdownPanel for Notepad++

Version 0.6.5.2
Version 0.6.5.3

Created by Mohzy 2019
Github: https://github.com/mohzy83/NppMarkdownPanel
Expand Down
8 changes: 4 additions & 4 deletions NppMarkdownPanel/MarkdownPanelController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,17 +311,17 @@ private void SyncViewWithCaret()
{
syncViewWithCaretPosition = !syncViewWithCaretPosition;
syncViewWithScrollPosition = false;
Win32.CheckMenuItem(Win32.GetMenu(PluginBase.nppData._nppHandle), PluginBase._funcItems.Items[2]._cmdID, Win32.MF_BYCOMMAND | (syncViewWithScrollPosition ? Win32.MF_CHECKED : Win32.MF_UNCHECKED));
Win32.CheckMenuItem(Win32.GetMenu(PluginBase.nppData._nppHandle), PluginBase._funcItems.Items[1]._cmdID, Win32.MF_BYCOMMAND | (syncViewWithCaretPosition ? Win32.MF_CHECKED : Win32.MF_UNCHECKED));
Win32.CheckMenuItem(Win32.GetMenu(PluginBase.nppData._nppHandle), PluginBase._funcItems.Items[3]._cmdID, Win32.MF_BYCOMMAND | (syncViewWithScrollPosition ? Win32.MF_CHECKED : Win32.MF_UNCHECKED));
Win32.CheckMenuItem(Win32.GetMenu(PluginBase.nppData._nppHandle), PluginBase._funcItems.Items[2]._cmdID, Win32.MF_BYCOMMAND | (syncViewWithCaretPosition ? Win32.MF_CHECKED : Win32.MF_UNCHECKED));
if (syncViewWithCaretPosition) ScrollToElementAtLineNo(scintillaGateway.GetCurrentLineNumber());
}

private void SyncViewWithScroll()
{
syncViewWithScrollPosition = !syncViewWithScrollPosition;
syncViewWithCaretPosition = false;
Win32.CheckMenuItem(Win32.GetMenu(PluginBase.nppData._nppHandle), PluginBase._funcItems.Items[1]._cmdID, Win32.MF_BYCOMMAND | (syncViewWithCaretPosition ? Win32.MF_CHECKED : Win32.MF_UNCHECKED));
Win32.CheckMenuItem(Win32.GetMenu(PluginBase.nppData._nppHandle), PluginBase._funcItems.Items[2]._cmdID, Win32.MF_BYCOMMAND | (syncViewWithScrollPosition ? Win32.MF_CHECKED : Win32.MF_UNCHECKED));
Win32.CheckMenuItem(Win32.GetMenu(PluginBase.nppData._nppHandle), PluginBase._funcItems.Items[2]._cmdID, Win32.MF_BYCOMMAND | (syncViewWithCaretPosition ? Win32.MF_CHECKED : Win32.MF_UNCHECKED));
Win32.CheckMenuItem(Win32.GetMenu(PluginBase.nppData._nppHandle), PluginBase._funcItems.Items[3]._cmdID, Win32.MF_BYCOMMAND | (syncViewWithScrollPosition ? Win32.MF_CHECKED : Win32.MF_UNCHECKED));
if (syncViewWithScrollPosition) ScrollToElementAtLineNo(scintillaGateway.GetFirstVisibleLine());
}

Expand Down
2 changes: 1 addition & 1 deletion NppMarkdownPanel/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.6.5.*")]
[assembly: AssemblyFileVersion("0.6.5.2")]
[assembly: AssemblyFileVersion("0.6.5.3")]

0 comments on commit 8f79300

Please sign in to comment.