View Issue Details

IDProjectCategoryView StatusLast Update
0000486Far ManagerDialogpublic2008-03-11 02:25
Reportersamlyukov Assigned Toalexy  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version1.80 alpha 1 
Summary0000486: Баг в Dialog::ProcessLastHistory - не подставлялось значение из истории
Descriptionсабж.
TagsNo tags attached.
Build428

Activities

2008-03-10 03:23

 

workFAR.diff (1,082 bytes)   
Index: dialog.cpp
===================================================================
--- dialog.cpp	(revision 1506)
+++ dialog.cpp	(working copy)
@@ -864,21 +864,20 @@
   CriticalSectionLock Lock(CS);
 
   string strRegKey;
-  string strData = CurItem->strData;
 
-  if( !strData.IsEmpty() )
+  if (CurItem->strData.IsEmpty())
   {
     DWORD UseFlags;
-    strRegKey.Format (fmtSavedDialogHistory,CurItem->History);
+    strRegKey.Format(fmtSavedDialogHistory,CurItem->History);
     UseFlags=GetRegKey(strRegKey,L"Flags",1);
-    if(UseFlags)
+    if (UseFlags)
     {
-      GetRegKey(strRegKey, L"Line0", strData, L"");
+      GetRegKey(strRegKey,L"Line0",CurItem->strData,L"");
       if (MsgIndex != -1)
       {
         // ��������� DM_SETHISTORY => ���� ��������� ��������� ������ �����
         // ��������� �����
-        Dialog::SendDlgMessage(this,DM_SETTEXTPTR,MsgIndex,(LONG_PTR)(const wchar_t*)strData);
+        Dialog::SendDlgMessage(this,DM_SETTEXTPTR,MsgIndex,(LONG_PTR)(const wchar_t*)CurItem->strData);
       }
     }
   }
workFAR.diff (1,082 bytes)   

samlyukov

2008-03-10 03:24

reporter   bugnote:0001260

в аттаче фикс.

alexy

2008-03-10 04:07

administrator   bugnote:0001262

+ Dialog::SendDlgMessage(this,DM_SETTEXTPTR,MsgIndex,(LONG_PTR)(const wchar_t*)CurItem->strData);

Вот тута будет прикольный крэш, это тоже самое что написать
strStr = (const wcahr_t *)strStr;

Надо видимо за одно и UnicodeString подправить.

samlyukov

2008-03-10 04:16

reporter   bugnote:0001263

> Вот тута будет прикольный крэш
угу ;-)

samlyukov

2008-03-10 08:05

reporter   bugnote:0001265

так как решил, через правку UnicodeString? или?

в принципе, можно не мудорствовать и изменить патч на следующее:
--- dialog.cpp (revision 1506)
+++ dialog.cpp (working copy)
@@ -863,17 +863,17 @@
 {
   CriticalSectionLock Lock(CS);
 
- string strRegKey;
- string strData = CurItem->strData;
-
- if( !strData.IsEmpty() )
+ if (CurItem->strData.IsEmpty())
   {
     DWORD UseFlags;
- strRegKey.Format (fmtSavedDialogHistory,CurItem->History);
+ string strRegKey;
+ string strData = CurItem->strData;
+ strRegKey.Format(fmtSavedDialogHistory,CurItem->History);
     UseFlags=GetRegKey(strRegKey,L"Flags",1);
- if(UseFlags)
+ if (UseFlags)
     {
- GetRegKey(strRegKey, L"Line0", strData, L"");
+ GetRegKey(strRegKey,L"Line0",strData,L"");
+ CurItem->strData=strData;
       if (MsgIndex != -1)
       {
         // обработка DM_SETHISTORY => надо пропустить изменение текста через

alexy

2008-03-10 08:35

administrator   bugnote:0001266

Да там полюбому надо US чинить, так что уже всё разом сделаю.

alexy

2008-03-10 14:05

administrator   bugnote:0001267

fixed. 428.

Issue History

Date Modified Username Field Change
2008-03-10 03:23 samlyukov New Issue
2008-03-10 03:23 samlyukov Status new => assigned
2008-03-10 03:23 samlyukov Assigned To => vskirdin
2008-03-10 03:23 samlyukov File Added: workFAR.diff
2008-03-10 03:24 samlyukov Note Added: 0001260
2008-03-10 03:40 alexy Assigned To vskirdin => alexy
2008-03-10 04:07 alexy Note Added: 0001262
2008-03-10 04:16 samlyukov Note Added: 0001263
2008-03-10 08:05 samlyukov Note Added: 0001265
2008-03-10 08:35 alexy Note Added: 0001266
2008-03-10 14:05 alexy Note Added: 0001267
2008-03-10 14:05 alexy Status assigned => feedback
2008-03-11 00:29 samlyukov Status feedback => resolved
2008-03-11 00:29 samlyukov Resolution open => fixed
2008-03-11 02:25 alexy Build => 428
2008-03-11 02:25 alexy Status resolved => closed
2008-03-11 02:25 alexy Fixed in Version => 1.80 alpha 1