summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2014-06-27 23:30:14 +0300
committerXhmikosR <xhmikosr@gmail.com>2014-06-27 23:30:39 +0300
commita56ef61cdca185cf3bbe4e89a7da8d456e68fc64 (patch)
tree8537bc0ab277af9d03850138ec7d9329eaea69ec
parent55a39c7fdefb25d045b9c86c78aacbd9a632718a (diff)
downloadnotepad2-mod-a56ef61cdca185cf3bbe4e89a7da8d456e68fc64.zip
notepad2-mod-a56ef61cdca185cf3bbe4e89a7da8d456e68fc64.tar.gz
notepad2-mod-a56ef61cdca185cf3bbe4e89a7da8d456e68fc64.tar.bz2
Partially revert "Fix a few variable reassignments."
This partially reverts commit b2e89111f9201f0205d5b2be13a1efe77f153075. WDK is old so things start to get weird... Fixes #89.
-rw-r--r--src/Notepad2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Notepad2.c b/src/Notepad2.c
index 66ff5b2..2275ccf 100644
--- a/src/Notepad2.c
+++ b/src/Notepad2.c
@@ -2869,9 +2869,10 @@ LRESULT MsgCommand(HWND hwnd,WPARAM wParam,LPARAM lParam)
case IDM_EDIT_SWAP:
if (SendMessage(hwndEdit,SCI_GETSELECTIONEND,0,0) -
SendMessage(hwndEdit,SCI_GETSELECTIONSTART,0,0) == 0) {
+ int iNewPos;
int iPos = (int)SendMessage(hwndEdit,SCI_GETCURRENTPOS,0,0);
SendMessage(hwndEdit,SCI_PASTE,0,0);
- int iNewPos = (int)SendMessage(hwndEdit,SCI_GETCURRENTPOS,0,0);
+ iNewPos = (int)SendMessage(hwndEdit,SCI_GETCURRENTPOS,0,0);
SendMessage(hwndEdit,SCI_SETSEL,iPos,iNewPos);
SendMessage(hwnd,WM_COMMAND,MAKELONG(IDM_EDIT_CLEARCLIPBOARD,1),0);
}