View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000439 | Far Manager | Command Line/Execute | public | 2007-12-14 20:46 | 2008-03-09 03:28 |
Reporter | alexmitin | Assigned To | alexy | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 1.80 alpha 1 | ||||
Summary | 0000439: Cancel after Ctrl+G should not update the panels | ||||
Description | Steps 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 Information | FAR 1.80.0.391 | ||||
Tags | No tags attached. | ||||
Build | 423 | ||||
|
патч. |
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 ============= Just cosmetic change: The return type of the ApplyCommand() should be "bool", not "int". The Return values "true" and "false", not "TRUE" and "FALSE". |
|
Довольно спорное уточнение, вглядываясь в код ФАРа, ну-да ладно... |
|
А почему ты там убрал вызов SetCurPath()? |
|
я не убрал, я перенес. оптимизация: если сказали "нет" - вываливаем ничего не делая. |
|
fixed. 423. |
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 |