Navigation Menu

Skip to content

Commit

Permalink
b4301 -- Уточнение 4279.
Browse files Browse the repository at this point in the history
  • Loading branch information
w17 committed Mar 11, 2015
1 parent d506d9d commit 1268b3d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion far/changelog
@@ -1,4 +1,8 @@
drkns 09.03.2015 23:54:31 +0200 - build 4300
w17 11.03.2015 13:20:04 +0300 - build 4301

1. Уточнение 4279.

drkns 09.03.2015 23:54:31 +0200 - build 4300

1. Уточнение 4298.

Expand Down
6 changes: 3 additions & 3 deletions far/editor.cpp
Expand Up @@ -5080,7 +5080,7 @@ bool Editor::IsFileModified() const
}

// èñïîëüçóåòñÿ â FileEditor
uint64_t Editor::GetCurPos(bool file_pos, bool add_bom) const
int64_t Editor::GetCurPos(bool file_pos, bool add_bom) const
{
auto CurPtr = Lines.begin();
uint64_t TotalSize = 0;
Expand All @@ -5104,7 +5104,7 @@ uint64_t Editor::GetCurPos(bool file_pos, bool add_bom) const
UINT cp_maxlen = 0;
std::tie(cp_maxlen, cp_name) = Codepages().GetCodePageInfo(m_codepage);
if (cp_maxlen > 1)
mult = -static_cast<int>(cp_maxlen);
mult = -1;
}
}

Expand All @@ -5120,7 +5120,7 @@ uint64_t Editor::GetCurPos(bool file_pos, bool add_bom) const
++CurPtr;
}

return TotalSize * (mult > 0 ? mult : 1) + bom;
return TotalSize*mult + bom;
}


Expand Down
2 changes: 1 addition & 1 deletion far/editor.hpp
Expand Up @@ -64,7 +64,7 @@ class Editor: public SimpleScreenObject
bool IsFileModified() const;
bool IsFileChanged() const;
void SetTitle(const wchar_t *Title);
uint64_t GetCurPos(bool file_pos = false, bool add_bom = false) const;
int64_t GetCurPos(bool file_pos = false, bool add_bom = false) const;
int EditorControl(int Command, intptr_t Param1, void *Param2);
void SetHostFileEditor(FileEditor *Editor) { HostFileEditor = Editor; }
void PrepareResizedConsole() { m_Flags.Set(FEDITOR_ISRESIZEDCONSOLE); }
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
@@ -1 +1 @@
m4_define(BUILD,4300)m4_dnl
m4_define(BUILD,4301)m4_dnl

0 comments on commit 1268b3d

Please sign in to comment.