Skip to content
Permalink
Browse files

1. уточнение 4673 для ECTL_SETPOSITION.

  • Loading branch information...
zg0 committed May 17, 2016
1 parent 1584703 commit 2bd4fabc7ec1365b1ca8cbdeaf446ad6c899474f
Showing with 19 additions and 9 deletions.
  1. +5 −1 far/changelog
  2. +12 −7 far/editor.cpp
  3. +1 −0 far/editor.hpp
  4. +1 −1 far/vbuild.m4
@@ -1,4 +1,8 @@
drkns 16.05.2016 22:55:36 +0200 - build 4675
zg 17.05.2016 13:03:38 +0200 - build 4676

1. уточнение 4673 для ECTL_SETPOSITION.

drkns 16.05.2016 22:55:36 +0200 - build 4675

1. Ещё одно уточнение работы запускателя.

@@ -643,12 +643,12 @@ __int64 Editor::VMProcess(int OpCode,void *vParam,__int64 iParam)
const auto _NumLine = m_it_CurLine.Number();
int _CurPos=m_it_CurLine->GetTabCurPos();

GoToLine(iLine);
GoToLineAndShow(iLine);
m_it_CurLine->SetCurPos(m_it_CurLine->TabPosToReal(iPos));

if (!EdOpt.CursorBeyondEOL && m_it_CurLine->GetCurPos() > m_it_CurLine->GetLength())
{
GoToLine(_NumLine);
GoToLineAndShow(_NumLine);
m_it_CurLine->SetCurPos(m_it_CurLine->TabPosToReal(_CurPos));
return 0;
}
@@ -2844,7 +2844,7 @@ int Editor::ProcessMouse(const MOUSE_EVENT_RECORD *MouseEvent)
else
{
while (IsMouseButtonPressed())
GoToLine((m_LinesCount-1)*(IntKeyState.MouseY-m_Y1)/(m_Y2-m_Y1));
GoToLineAndShow((m_LinesCount-1)*(IntKeyState.MouseY-m_Y1)/(m_Y2-m_Y1));
}

return TRUE;
@@ -4451,10 +4451,15 @@ void Editor::GoToLine(int Line)
// if (!EdOpt.PersistentBlocks)
// UnmarkBlock();
// </GOTO_UNMARK>
Show();
return;
}

void Editor::GoToLineAndShow(int Line)
{
GoToLine(Line);
Show();
}

void Editor::GoToPosition()
{
DialogBuilder Builder(MEditGoToLine, L"EditorGotoPos");
@@ -4768,7 +4773,7 @@ void Editor::Undo(int redo)
{
if (ud->m_Type != UNDO_BEGIN && ud->m_Type != UNDO_END)
{
GoToLine(ud->m_StrNum);
GoToLineAndShow(ud->m_StrNum);
}

switch (ud->m_Type)
@@ -6973,7 +6978,7 @@ void Editor::SetCacheParams(EditorPosCache &pc, bool count_bom)

if (pc.cur.Line >= pc.cur.ScreenLine)
{
GoToLine(pc.cur.Line-pc.cur.ScreenLine);
GoToLineAndShow(pc.cur.Line-pc.cur.ScreenLine);
m_it_TopScreen = m_it_CurLine;

repeat(pc.cur.ScreenLine, [this](){ ProcessKey(Manager::Key(KEY_DOWN)); });
@@ -7207,7 +7212,7 @@ int Editor::GetCurCol() const

void Editor::SetCurPos(int NewCol, int NewRow)
{
GoToLine(NewRow);
GoToLineAndShow(NewRow);
m_it_CurLine->SetTabCurPos(NewCol);
}

@@ -206,6 +206,7 @@ class Editor: public SimpleScreenObject
void ScrollUp();
BOOL Search(int Next);
void GoToLine(int Line);
void GoToLineAndShow(int Line);
void GoToPosition();
void TextChanged(bool State);
int CalcDistance(const numbered_iterator& From, const numbered_iterator& To) const;
@@ -1 +1 @@
m4_define(BUILD,4675)m4_dnl
m4_define(BUILD,4676)m4_dnl

0 comments on commit 2bd4fab

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