Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
moar 4309
  • Loading branch information
alabuzhev committed Mar 18, 2015
1 parent de9f7b6 commit 088ee99
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
6 changes: 5 additions & 1 deletion far/changelog
@@ -1,4 +1,8 @@
zg 18.03.2015 16:13:08 +0200 - build 4314
drkns 18.03.2015 22:06:40 +0200 - build 4315

1. Продолжение 4309.

zg 18.03.2015 16:13:08 +0200 - build 4314

1. уточнение 4309: по ctrla в редакторе выделялся блок неопределённого типа.

Expand Down
16 changes: 8 additions & 8 deletions far/editor.cpp
Expand Up @@ -676,7 +676,7 @@ __int64 Editor::VMProcess(int OpCode,void *vParam,__int64 iParam)
{
int Ret=0;

if (CheckLine(m_it_MBlockStart))
if (m_it_MBlockStart != Lines.end())
{
EditorSelect eSel={sizeof(EditorSelect)};
eSel.BlockType=(Action == 2)?BTYPE_STREAM:BTYPE_COLUMN;
Expand Down Expand Up @@ -1505,7 +1505,7 @@ int Editor::ProcessKey(const Manager::Key& Key)
case KEY_CTRLINS: case KEY_CTRLNUMPAD0:
case KEY_RCTRLINS: case KEY_RCTRLNUMPAD0:
{
if (/*!EdOpt.PersistentBlocks && */ IsNoSelection())
if (/*!EdOpt.PersistentBlocks && */ !IsAnySelection())
{
m_it_AnyBlockStart = m_it_CurLine;
m_it_CurLine->AddSelect(0,-1);
Expand Down Expand Up @@ -3086,7 +3086,7 @@ Editor::numbered_iterator Editor::DeleteString(numbered_iterator DelPtr, bool De
}
if (!VBlockSizeY)
{
m_it_AnyBlockStart = EndIterator();
Unselect();
}
}

Expand All @@ -3106,9 +3106,9 @@ Editor::numbered_iterator Editor::DeleteString(numbered_iterator DelPtr, bool De
UpdateIterator(m_it_LastGetLine);
UpdateIterator(m_it_MBlockStart);

if (m_it_MBlockStart != Lines.end() && !m_it_MBlockStart->IsSelection())
if (IsAnySelection() && !m_it_AnyBlockStart->IsSelection())
{
m_it_MBlockStart = EndIterator();
Unselect();
}

if (IsLastLine(DelPtr))
Expand Down Expand Up @@ -4369,7 +4369,7 @@ void Editor::DeleteBlock()
}

AddUndoData(UNDO_END);
m_it_AnyBlockStart = EndIterator();
Unselect();
}


Expand Down Expand Up @@ -4412,7 +4412,7 @@ void Editor::UnmarkBlock()
++m_it_AnyBlockStart;
}

m_it_AnyBlockStart = EndIterator();
Unselect();
Show();
}

Expand Down Expand Up @@ -5194,7 +5194,7 @@ void Editor::DeleteVBlock()
}

AddUndoData(UNDO_END);
m_it_AnyBlockStart = EndIterator();
Unselect();
}

void Editor::VCopy(int Append)
Expand Down
3 changes: 2 additions & 1 deletion far/editor.hpp
Expand Up @@ -314,7 +314,8 @@ class Editor: public SimpleScreenObject
bool IsAnySelection() const { assert(Lines.end() == m_it_AnyBlockStart || m_BlockType != BTYPE_NONE); return Lines.end() != m_it_AnyBlockStart; }
bool IsStreamSelection() const { return IsAnySelection() && m_BlockType == BTYPE_STREAM; }
bool IsVerticalSelection() const { return IsAnySelection() && m_BlockType == BTYPE_COLUMN; }
bool IsNoSelection() const { return !IsAnySelection(); }

void Unselect() { m_it_AnyBlockStart = EndIterator(); m_BlockType = BTYPE_NONE; }

// Ìëàäøèé áàéò (ìàñêà 0xFF) þçàåòñÿ êëàññîì ScreenObject!!!
enum editor_flags
Expand Down
2 changes: 0 additions & 2 deletions far/findfile.cpp
Expand Up @@ -80,8 +80,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "filestr.hpp"
#include "exitcode.hpp"

const int CHAR_TABLE_SIZE=5;

// Ñïèñîê àðõèâîâ. Åñëè ôàéë íàéäåí â àðõèâå, òî FindList->ArcIndex óêàçûâàåò ñþäà.
struct ArcListItem
{
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
@@ -1 +1 @@
m4_define(BUILD,4314)m4_dnl
m4_define(BUILD,4315)m4_dnl

0 comments on commit 088ee99

Please sign in to comment.