mirror of https://gitlab.com/basile.b/dexed.git
editor, allow temporarily column selection even if option eoScrollPastEol not enabled
This commit is contained in:
parent
e3656f0d54
commit
619c169024
|
@ -203,7 +203,7 @@ begin
|
|||
//
|
||||
FreeAndNil(fJSON);
|
||||
parser := TJSONParser.Create(loader, true);
|
||||
//TODO-cDUB: uses parser.options to allow trailing comma (from FPC 3.02)
|
||||
//TODO-cgonnawork: from FPC 3.02, uses parser.options to allow trailing comma in DUB descriptions
|
||||
// http://bugs.freepascal.org/view.php?id=29357
|
||||
try
|
||||
try
|
||||
|
|
|
@ -1025,7 +1025,7 @@ begin
|
|||
try
|
||||
DockMaster.SaveLayoutToConfig(xcfg);
|
||||
xcfg.WriteToDisk;
|
||||
// TODO: remove this when AnchorDocking wont save anymore invalid layout
|
||||
// TODO-cdocking: remove this when AnchorDocking wont save anymore invalid layout
|
||||
with TMemoryStream.Create do try
|
||||
LoadFromFile(getCoeditDocPath + 'docking.xml.tmp');
|
||||
if Size < 10000 then
|
||||
|
@ -1148,7 +1148,7 @@ begin
|
|||
LoadLastDocsAndProj;
|
||||
|
||||
// http://bugs.freepascal.org/view.php?id=29475
|
||||
// TODO-cbugfix: activate this when Laz 1.6 released.
|
||||
// TODO-cgonnawork: activate this when Laz 1.6 released.
|
||||
// DockMaster.ResetSplitter;
|
||||
|
||||
fFirstShown := true;
|
||||
|
@ -2098,7 +2098,7 @@ begin
|
|||
DockMaster.SaveLayoutToConfig(xcfg);
|
||||
xcfg.WriteToDisk;
|
||||
// prevent any invalid layout to be saved (AnchorDocking bug)
|
||||
// TODO: remove this when AnchorDocking wont save anymore invalid layout
|
||||
// TODO-cdocking: remove this when AnchorDocking wont save anymore invalid layout
|
||||
with TMemoryStream.Create do try
|
||||
LoadFromFile(aFilename + '.tmp');
|
||||
if Size < 10000 then
|
||||
|
@ -2176,7 +2176,7 @@ begin
|
|||
widg.Parent.Parent.isNil and widg.isDockable then
|
||||
begin
|
||||
TForm(widg.Parent).FormStyle := fstyle[onTop];
|
||||
//TODO-bugfix: floating widg on top from true to false, widg remains on top
|
||||
//TODO-cbugfix: floating widg on top from true to false, widg remains on top
|
||||
if TForm(widg.Parent).Visible then if not onTop then
|
||||
TForm(widg.Parent).SendToBack;
|
||||
end;
|
||||
|
|
|
@ -130,6 +130,7 @@ type
|
|||
fMatchIdentOpts: TSynSearchOptions;
|
||||
fMatchOpts: TIdentifierMatchOptions;
|
||||
fCallTipStrings: TStringList;
|
||||
fOverrideColMode: boolean;
|
||||
procedure setMatchOpts(value: TIdentifierMatchOptions);
|
||||
function getMouseFileBytePos: Integer;
|
||||
procedure changeNotify(Sender: TObject);
|
||||
|
@ -309,7 +310,7 @@ begin
|
|||
fFontSize := fMemo.Font.Size;
|
||||
TCEEditorHintWindow.FontSize := fMemo.Font.Size;
|
||||
//
|
||||
// TODO-cEditor Cache: >nested< folding persistence
|
||||
// TODO-cimprovment: handle nested folding in TCESynMemoCache
|
||||
// cf. other ways: http://forum.lazarus.freepascal.org/index.php?topic=26748.msg164722#msg164722
|
||||
prev := fMemo.Lines.Count-1;
|
||||
for i := fMemo.Lines.Count-1 downto 0 do
|
||||
|
@ -766,6 +767,11 @@ begin
|
|||
showCallTips;
|
||||
end;
|
||||
end;
|
||||
if fOverrideColMode and not SelAvail then
|
||||
begin
|
||||
fOverrideColMode := false;
|
||||
Options := Options - [eoScrollPastEol];
|
||||
end;
|
||||
end;
|
||||
{$ENDREGIOn}
|
||||
|
||||
|
@ -1243,6 +1249,12 @@ begin
|
|||
fCanShowHint := false;
|
||||
hideCallTips;
|
||||
hideDDocs;
|
||||
if (emAltSetsColumnMode in MouseOptions) and not (eoScrollPastEol in Options)
|
||||
and (ssLeft in shift) and (ssAlt in Shift) then
|
||||
begin
|
||||
fOverrideColMode := true;
|
||||
Options := Options + [eoScrollPastEol];
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCESynMemo.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y:Integer);
|
||||
|
@ -1251,11 +1263,15 @@ begin
|
|||
case Button of
|
||||
mbMiddle: if (Shift = [ssCtrl]) then
|
||||
Font.Size := fDefaultFontSize;
|
||||
// linux, kde: mbExtra are never called
|
||||
mbExtra1: fPositions.back;
|
||||
mbExtra2: fPositions.next;
|
||||
mbLeft: fPositions.store;
|
||||
end;
|
||||
if fOverrideColMode and not SelAvail then
|
||||
begin
|
||||
fOverrideColMode := false;
|
||||
Options := Options - [eoScrollPastEol];
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCESynMemo.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean;
|
||||
|
|
Loading…
Reference in New Issue