Skip to content
Permalink
Browse files

b4263 -- Viewer autoupdate при наличии ACTL_SYNCHRO или far.Timer() (…

…M#2532)
  • Loading branch information...
w17 committed Feb 3, 2015
1 parent 8bb29a2 commit aa2466010b6574fbfa7cc440cc1f4bf50244ba49
Showing with 20 additions and 3 deletions.
  1. +5 −1 far/changelog
  2. +1 −1 far/vbuild.m4
  3. +13 −1 far/viewer.cpp
  4. +1 −0 far/viewer.hpp
@@ -1,4 +1,8 @@
w17 03.02.2015 17:43:09 +0300 - build 4262
w17 03.02.2015 20:32:45 +0300 - build 4263

1. Viewer autoupdate при наличии ACTL_SYNCHRO или far.Timer() (M#2532)

w17 03.02.2015 17:43:09 +0300 - build 4262

1. Некорректное отображение текста изменённого файла при переключении во вьювер.

@@ -1 +1 @@
m4_define(BUILD,4262)m4_dnl
m4_define(BUILD,4263)m4_dnl
@@ -173,6 +173,8 @@ Viewer::Viewer(window_ptr Owner, bool bQuickView, uintptr_t aCodePage):
VM.Wrap=Global->Opt->ViOpt.ViewerIsWrap;
VM.WordWrap=Global->Opt->ViOpt.ViewerWrap;
VM.Hex = -1;

m_IdleCheck = std::make_unique<time_check>(time_check::delayed, 500);
}

Viewer::~Viewer()
@@ -1434,7 +1436,17 @@ __int64 Viewer::VMProcess(int OpCode,void *vParam,__int64 iParam)

int Viewer::ProcessKey(const Manager::Key& Key)
{
int LocalKey=Key.FarKey;
int LocalKey = Key.FarKey;

if (LocalKey != KEY_NONE)
m_IdleCheck->reset();
else {
if (*m_IdleCheck)
LocalKey = KEY_IDLE;
else
Sleep(10);
}

if ( !ViOpt.PersistentBlocks &&
LocalKey!=KEY_IDLE && LocalKey!=KEY_NONE && !(LocalKey==KEY_CTRLINS||LocalKey==KEY_RCTRLINS||LocalKey==KEY_CTRLNUMPAD0||LocalKey==KEY_RCTRLNUMPAD0) &&
LocalKey!=KEY_CTRLC && LocalKey!=KEY_RCTRLC &&
@@ -225,6 +225,7 @@ class Viewer:public SimpleScreenObject
uintptr_t DefCodePage;

std::unique_ptr<time_check> m_TimeCheck;
std::unique_ptr<time_check> m_IdleCheck;

std::vector<char> vread_buffer;

0 comments on commit aa24660

Please sign in to comment.
You can’t perform that action at this time.