Skip to content

Commit

Permalink
1. 0003367: Undo оставляет пробелы, которых не было.
Browse files Browse the repository at this point in the history
  • Loading branch information
zg0 committed Dec 16, 2016
1 parent 8fe72b3 commit f54e43c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 4 additions & 0 deletions far/changelog
@@ -1,3 +1,7 @@
zg 17.12.2016 01:01:39 +0200 - build 4870

1. 0003367: Undo оставляет пробелы, которых не было.

drkns 14.12.2016 01:41:17 +0200 - build 4869

1. 0003353: Ошибка отрисовки при выходе машины из спячки.
Expand Down
16 changes: 6 additions & 10 deletions far/editor.cpp
Expand Up @@ -2563,10 +2563,14 @@ bool Editor::ProcessKeyInternal(const Manager::Key& Key, bool& Refresh)
}

const auto& Str = m_it_CurLine->GetString();
string CmpStr;

intptr_t LocalCurPos = m_it_CurLine->GetCurPos();
if (!SkipCheckUndo)
{
CmpStr = Str;
}

if (IsCharKey(LocalKey()) && LocalCurPos>0 && Str.empty())
if (IsCharKey(LocalKey()) && m_it_CurLine->GetCurPos()>0 && Str.empty())
{
auto PrevLine = m_it_CurLine == Lines.begin()? Lines.end() : std::prev(m_it_CurLine);

Expand Down Expand Up @@ -2613,14 +2617,6 @@ bool Editor::ProcessKeyInternal(const Manager::Key& Key, bool& Refresh)
}
}

string CmpStr;

if (!SkipCheckUndo)
{
LocalCurPos=m_it_CurLine->GetCurPos();
CmpStr = Str;
}

if (LocalKey() == KEY_OP_XLAT)
{
Xlat();
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
@@ -1 +1 @@
m4_define(BUILD,4869)m4_dnl
m4_define(BUILD,4870)m4_dnl

0 comments on commit f54e43c

Please sign in to comment.