Skip to content

Commit

Permalink
editor replace fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed May 25, 2016
1 parent fa74de5 commit 924a397
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions far/changelog
@@ -1,3 +1,7 @@
drkns 25.05.2016 20:16:03 +0200 - build 4693

1. При [x] Cursor at the end неадекватно работала замена в редакторе, содержащая \t.

zg 24.05.2016 13:58:55 +0200 - build 4692

1. уточнение 4685.
Expand Down
14 changes: 7 additions & 7 deletions far/editor.cpp
Expand Up @@ -3697,7 +3697,7 @@ BOOL Editor::Search(int Next)
int I=0;
for (; SearchLength && I<static_cast<int>(strReplaceStrCurrent.size()); ++I, --SearchLength)
{
int Ch=strReplaceStrCurrent[I];
const auto Ch = strReplaceStrCurrent[I];

if (Ch==KEY_TAB)
{
Expand All @@ -3719,7 +3719,7 @@ BOOL Editor::Search(int Next)
ProcessKeyInternal(Manager::Key(KEY_DEL), RefreshMe);
}

if (Ch!=KEY_BS && !(Ch==KEY_DEL || Ch==KEY_NUMDEL))
if (Ch!=KEY_BS)
ProcessKeyInternal(Manager::Key(Ch), RefreshMe);
}

Expand All @@ -3732,9 +3732,9 @@ BOOL Editor::Search(int Next)

for (; I<static_cast<int>(strReplaceStrCurrent.size()); I++)
{
int Ch=strReplaceStrCurrent[I];
const auto Ch = strReplaceStrCurrent[I];
NeedUpdateCurPtr = Ch == KEY_ENTER;
if (Ch!=KEY_BS && !(Ch==KEY_DEL || Ch==KEY_NUMDEL))
if (Ch!=KEY_BS)
ProcessKeyInternal(Manager::Key(Ch), RefreshMe);
}
}
Expand Down Expand Up @@ -3774,13 +3774,13 @@ BOOL Editor::Search(int Next)
CurPtr->Select(LocalCurPos, LocalCurPos + static_cast<int>(strReplaceStrCurrent.size()));
}

if (at_end)
at_end = static_cast<int>(strReplaceStrCurrent.size());

Change(ECTYPE_CHANGED, m_it_CurLine.Number());
TextChanged(1);
}

if (at_end)
at_end = static_cast<int>(strReplaceStrCurrent.size());

Pasting--;
}
}
Expand Down
8 changes: 4 additions & 4 deletions far/farlang.templ.m4
Expand Up @@ -3574,11 +3574,11 @@ MEditConfigSelFound

MEditConfigCursorAtEnd
"Курсор в ко&нце"
"Cu&rsor at end"
upd:"Cursor at end"
"Cu&rsor at the end"
upd:"Cursor at the end"
"Pfeile am Ende"
upd:"Cursor at end"
upd:"Cursor at end"
upd:"Cursor at the end"
upd:"Cursor at the end"
"Cursor al final"
"Kurzor na konci"
"Cursore Alla &Fine"
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
@@ -1 +1 @@
m4_define(BUILD,4692)m4_dnl
m4_define(BUILD,4693)m4_dnl

0 comments on commit 924a397

Please sign in to comment.