mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
ide: Git history diff dialog now sets cursor on the same line as editor
This commit is contained in:
parent
ec2a567387
commit
3e81cb3ec1
8 changed files with 79 additions and 14 deletions
|
|
@ -103,9 +103,10 @@ private:
|
|||
friend struct TextDiffCtrl;
|
||||
|
||||
public:
|
||||
Event<> WhenSel;
|
||||
Event<> WhenScroll;
|
||||
Callback2<int, int> WhenLeftDouble;
|
||||
Event<> WhenSel;
|
||||
Event<> WhenCursor;
|
||||
Event<> WhenScroll;
|
||||
Event<int, int> WhenLeftDouble;
|
||||
Event<Vector<LineEdit::Highlight>&, const WString&> WhenHighlight;
|
||||
|
||||
void SetCount(int c);
|
||||
|
|
@ -128,11 +129,11 @@ public:
|
|||
int GetTabSize() const { return tabsize; }
|
||||
|
||||
void Set(int line, String text, bool diff, int number, int level, String text_diff, int number_diff);
|
||||
String GetText(int line) const { return lines[line].text; }
|
||||
bool GetDiff(int line) const { return lines[line].diff; }
|
||||
int GetNumber(int line) const { return lines[line].number; }
|
||||
String GetText(int line) const { return lines[line].text; }
|
||||
bool GetDiff(int line) const { return lines[line].diff; }
|
||||
int GetNumber(int line) const { return lines[line].number; }
|
||||
int GetNumberDiff(int line) const { return lines[line].number_diff; }
|
||||
bool HasLine(int line) const { return !IsNull(lines[line].number); }
|
||||
bool HasLine(int line) const { return !IsNull(lines[line].number); }
|
||||
|
||||
Point GetPos() const;
|
||||
void SetPos(Point pos);
|
||||
|
|
@ -159,6 +160,11 @@ public:
|
|||
|
||||
void SetLeft() { left = true; }
|
||||
|
||||
bool SetCursor(int c);
|
||||
int GetLine(int cursor) const;
|
||||
int GetLine() const;
|
||||
void SetLine(int ii);
|
||||
|
||||
String RemoveSelected(bool cr);
|
||||
|
||||
Event<> ScrollWhen(TextCompareCtrl& pair) { return THISBACK1(PairScroll, &pair); }
|
||||
|
|
@ -170,6 +176,7 @@ struct TextDiffCtrl : public Splitter {
|
|||
TextCompareCtrl left;
|
||||
TextCompareCtrl right;
|
||||
FrameTop<Button> next, prev;
|
||||
int cl = 0; // to lock WhenCursor -> SetLine
|
||||
|
||||
typedef TextDiffCtrl CLASSNAME;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue