View Issue Details

IDProjectCategoryView StatusLast Update
0000439Far ManagerCommand Line/Executepublic2008-03-09 03:28
Reporteralexmitin Assigned Toalexy  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version1.80 alpha 1 
Summary0000439: Cancel after Ctrl+G should not update the panels
DescriptionSteps to reproduce:

1) Press Ctrl+G
2) Press Cancel

Expected Result
=================
The "Apply command" is canceled. Panels remains unchanged.


Actual Result
=================
The "Apply command" is canceled. Both panels are refreshed.


Consider the scenario when the user opened panels with several thousand files from remote location. Unnecessary panel updates annoys the user because it's time consuming and delays his work.
Additional InformationFAR 1.80.0.391
TagsNo tags attached.
Build423

Activities

samlyukov

2007-12-15 02:15

reporter   bugnote:0001044

патч.

2007-12-15 02:15

 

workFAR.diff (1,860 bytes)   
Index: filelist.hpp
===================================================================
--- filelist.hpp	(revision 1402)
+++ filelist.hpp	(working copy)
@@ -274,7 +274,7 @@
     int PopPlugin(int EnableRestoreViewMode);
     void CopyNames(int FillPathName=FALSE,int UNC=FALSE);
     void SelectSortMode();
-    void ApplyCommand();
+    int ApplyCommand();
     void DescribeFiles();
     void CreatePluginItemList(struct PluginPanelItem *(&ItemList),int &ItemNumber,BOOL AddTwoDot=TRUE);
     void DeletePluginItemList(struct PluginPanelItem *(&ItemList),int &ItemNumber);
Index: filelist.cpp
===================================================================
--- filelist.cpp	(revision 1402)
+++ filelist.cpp	(working copy)
@@ -941,9 +941,8 @@
       _ALGO(CleverSysLog clv(L"Ctrl-G"));
       if (PanelMode!=PLUGIN_PANEL ||
           CtrlObject->Plugins.UseFarCommand(hPlugin,PLUGIN_FAROTHER))
-        if (FileCount>0 && SetCurPath())
+        if (FileCount>0 && ApplyCommand())
         {
-          ApplyCommand();
           Update(UPDATE_KEEP_SELECTION);
           Redraw();
           Panel *AnotherPanel=CtrlObject->Cp()->GetAnotherPanel(this);
@@ -3845,13 +3844,13 @@
 }
 
 
-void FileList::ApplyCommand()
+int FileList::ApplyCommand()
 {
   static string strPrevCommand;
   string strCommand;
 
-  if (!GetString(UMSG(MAskApplyCommandTitle),UMSG(MAskApplyCommand),L"ApplyCmd",strPrevCommand,strCommand,260, L"ApplyCmd",FIB_BUTTONS))
-    return;
+  if (!GetString(UMSG(MAskApplyCommandTitle),UMSG(MAskApplyCommand),L"ApplyCmd",strPrevCommand,strCommand,260, L"ApplyCmd",FIB_BUTTONS) || !SetCurPath())
+    return (FALSE);
 
   strPrevCommand = strCommand;
   string strSelName, strSelShortName;
@@ -3887,6 +3886,7 @@
     ScrBuf.Scroll(1);
     ScrBuf.Flush();
   }
+  return (TRUE);
 }
 
 
workFAR.diff (1,860 bytes)   

alexmitin

2007-12-15 09:59

reporter   bugnote:0001047

workFAR.diff
=============
Just cosmetic change:
   The return type of the ApplyCommand() should be "bool", not "int".
   The Return values "true" and "false", not "TRUE" and "FALSE".

samlyukov

2007-12-15 10:09

reporter   bugnote:0001048

Довольно спорное уточнение, вглядываясь в код ФАРа, ну-да ладно...

alexy

2007-12-25 05:05

administrator   bugnote:0001076

А почему ты там убрал вызов SetCurPath()?

samlyukov

2007-12-25 05:40

reporter   bugnote:0001079

я не убрал, я перенес. оптимизация: если сказали "нет" - вываливаем ничего не делая.

alexy

2008-03-08 10:22

administrator   bugnote:0001243

fixed. 423.

Issue History

Date Modified Username Field Change
2007-12-14 20:46 alexmitin New Issue
2007-12-14 20:46 alexmitin Status new => assigned
2007-12-14 20:46 alexmitin Assigned To => alexy
2007-12-15 02:15 samlyukov Note Added: 0001044
2007-12-15 02:15 samlyukov File Added: workFAR.diff
2007-12-15 09:59 alexmitin Note Added: 0001047
2007-12-15 10:09 samlyukov Note Added: 0001048
2007-12-25 05:05 alexy Note Added: 0001076
2007-12-25 05:40 samlyukov Note Added: 0001079
2008-03-08 10:22 alexy Note Added: 0001243
2008-03-08 10:22 alexy Status assigned => feedback
2008-03-08 22:51 samlyukov Status feedback => resolved
2008-03-08 22:51 samlyukov Resolution open => fixed
2008-03-09 03:28 alexy Build => 423
2008-03-09 03:28 alexy Status resolved => closed
2008-03-09 03:28 alexy Fixed in Version => 1.80 alpha 1