summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-09-05 16:12:04 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-09-05 16:12:04 +0300
commitcf6175b91f68dff14731bee7569602c6855ce2c7 (patch)
treec97c66820014d368223dd56039b2b63020c7b7cb /plugins/NewStory/src
parent90e682bbe7b3be96b741fe32ec11cc26f58ab5a2 (diff)
useless parameter removed
Diffstat (limited to 'plugins/NewStory/src')
-rw-r--r--plugins/NewStory/src/history_control.cpp12
-rw-r--r--plugins/NewStory/src/history_control.h2
-rw-r--r--plugins/NewStory/src/history_menus.cpp2
3 files changed, 8 insertions, 8 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index 313d8bd3ea..ed4df6fd3f 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -190,15 +190,15 @@ static LRESULT CALLBACK HistoryEditWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
return mir_callNextSubclass(hwnd, HistoryEditWndProc, msg, wParam, lParam);
}
-void NewstoryListData::BeginEditItem(int index, bool bReadOnly)
+void NewstoryListData::BeginEditItem(bool bReadOnly)
{
if (hwndEditBox)
EndEditItem(false);
- if (scrollTopItem > index)
+ if (scrollTopItem > caret)
return;
- ItemData *item = LoadItem(index);
+ ItemData *item = LoadItem(caret);
if (item->dbe.eventType != EVENTTYPE_MESSAGE)
return;
@@ -209,7 +209,7 @@ void NewstoryListData::BeginEditItem(int index, bool bReadOnly)
int idx = scrollTopItem;
int itemHeight = GetItemHeight(idx);
while (top < height) {
- if (idx == index)
+ if (idx == caret)
break;
top += itemHeight;
@@ -977,7 +977,7 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
break;
case VK_F2:
- data->BeginEditItem(data->caret, false);
+ data->BeginEditItem(false);
break;
case VK_ESCAPE:
@@ -1060,7 +1060,7 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
}
if (data->caret == idx) {
- data->BeginEditItem(idx, true);
+ data->BeginEditItem(true);
return 0;
}
}
diff --git a/plugins/NewStory/src/history_control.h b/plugins/NewStory/src/history_control.h
index 00762259ee..7b8551b404 100644
--- a/plugins/NewStory/src/history_control.h
+++ b/plugins/NewStory/src/history_control.h
@@ -59,7 +59,7 @@ struct NewstoryListData : public MZeroedObject
void AddSelection(int iFirst, int iLast);
bool AtBottom(void) const;
bool AtTop(void) const;
- void BeginEditItem(int index, bool bReadOnly);
+ void BeginEditItem(bool bReadOnly);
void Clear();
void ClearSelection(int iFirst, int iLast);
void Copy(bool bTextOnly = false);
diff --git a/plugins/NewStory/src/history_menus.cpp b/plugins/NewStory/src/history_menus.cpp
index 394ede04a3..1d1a6e3e3d 100644
--- a/plugins/NewStory/src/history_menus.cpp
+++ b/plugins/NewStory/src/history_menus.cpp
@@ -65,7 +65,7 @@ static INT_PTR NSMenuHelper(WPARAM wParam, LPARAM lParam)
break;
case MENU_EDIT:
- pData->BeginEditItem(pData->caret, false);
+ pData->BeginEditItem(false);
break;
case MENU_DELETE: