diff --git a/app/src/gambas3/.project b/app/src/gambas3/.project index 3a4adbb06..eefe315d8 100644 --- a/app/src/gambas3/.project +++ b/app/src/gambas3/.project @@ -2,6 +2,7 @@ # Compiled with Gambas 3.8.90 Title=Gambas 3 Startup=Project +Profiling=1 Icon=img/logo/logo-ide.png Version=3.8.90 VersionFile=1 diff --git a/app/src/gambas3/.src/FMain.class b/app/src/gambas3/.src/FMain.class index 6e97a5735..343a04fd9 100644 --- a/app/src/gambas3/.src/FMain.class +++ b/app/src/gambas3/.src/FMain.class @@ -2466,8 +2466,10 @@ Public Sub OpenExternFile(Optional sPath As String) If Not sPath Then Dialog.Title = ("Select a file") + Dialog.Path = Settings["/OpenExtern"] If Dialog.OpenFile() Then Return sPath = Dialog.Path + Settings["/OpenExtern"] = sPath Endif $bInOpenExtern = True diff --git a/app/src/gambas3/img/control/webview.png b/app/src/gambas3/img/control/webview.png new file mode 100644 index 000000000..9c8dbf466 Binary files /dev/null and b/app/src/gambas3/img/control/webview.png differ diff --git a/comp/src/gb.form.editor/.info b/comp/src/gb.form.editor/.info index dab604220..437187b40 100644 --- a/comp/src/gb.form.editor/.info +++ b/comp/src/gb.form.editor/.info @@ -353,6 +353,10 @@ HideSelection m +_RaiseCursor +m + + EnsureVisible_Timer m diff --git a/comp/src/gb.form.editor/.src/CDocument.class b/comp/src/gb.form.editor/.src/CDocument.class index f06aabc2e..54f28d7e2 100644 --- a/comp/src/gb.form.editor/.src/CDocument.class +++ b/comp/src/gb.form.editor/.src/CDocument.class @@ -171,6 +171,8 @@ Public Sub End() EnableHighlight AddUndo(CCommand(Me, CCommand.END,, Me.Current.Column, Me.Current.Line)) + CheckUnlock + End Private Function Current_Read() As TextEditor @@ -1264,6 +1266,24 @@ End Public Sub EnableUndo() Dec $iNoUndo + CheckUnlock End +Public Sub IsLocked() As Boolean + + Return $iBegin + $iNoUndo + +End + +Private Sub CheckUnlock() + + Dim hView As TextEditor + + If IsLocked() Then Return + For Each hView In GetAllViews() + hView._RaiseCursor + Next + + +End \ No newline at end of file diff --git a/comp/src/gb.form.editor/.src/TextEditor.class b/comp/src/gb.form.editor/.src/TextEditor.class index 9adefd3db..970bb51e6 100644 --- a/comp/src/gb.form.editor/.src/TextEditor.class +++ b/comp/src/gb.form.editor/.src/TextEditor.class @@ -95,6 +95,8 @@ Private $Y As Integer Private $XY As Point Private $bShowCursor As Boolean Private $bHideCursor As Boolean +Private $LX As Integer +Private $LY As Integer Private $hTimerCursor As Timer Private $hTimerChange As Timer @@ -148,6 +150,7 @@ Private $bFirstFocus As Boolean Private $aFold As Integer[] +Private $iSaveCursor As Integer Private $aSaveCursor As Integer[] Private $hFontNumber As Font @@ -1387,6 +1390,20 @@ Public Sub HideSelection() End +Public Sub _RaiseCursor() + + If $iSaveCursor Then Return + If $X = $LX And If $Y = $LY Then Return + If $hDoc.IsLocked() Then Return + + $LX = $X + $LY = $Y + EnsureVisible + If $bShowPosition Then UpdatePosition + Raise Cursor + +End + Public Sub Goto(NX As Integer, NY As Integer, Optional Mark As Boolean) Dim bRaiseCursor As Boolean @@ -1450,16 +1467,9 @@ Public Sub Goto(NX As Integer, NY As Integer, Optional Mark As Boolean) _RefreshLine($Y) '$hView.EnsureVisible($XX, $hRows._GetRowY($Y), $MW + 3, $hRows._GetRowHeight($Y)) - EnsureVisible CheckMatch - - If bRaiseCursor Then - If $bShowPosition Then - UpdatePosition - Endif - Raise Cursor - Endif + _RaiseCursor End @@ -4213,7 +4223,8 @@ End Public Sub _SaveCursor() - $aSaveCursor = [$X, $Y, $SX, $SY] + If $iSaveCursor = 0 Then $aSaveCursor = [$X, $Y, $SX, $SY] + Inc $iSaveCursor End @@ -4221,6 +4232,9 @@ Public Sub _RestoreCursor() Dim X, Y, SX, SY As Integer + Dec $iSaveCursor + If $iSaveCursor Then Return + X = $aSaveCursor[0] Y = $aSaveCursor[1] SX = $aSaveCursor[2] diff --git a/comp/src/gb.form.editor/.src/_TextEditor_Line.class b/comp/src/gb.form.editor/.src/_TextEditor_Line.class index c2a36800a..92326ccc9 100644 --- a/comp/src/gb.form.editor/.src/_TextEditor_Line.class +++ b/comp/src/gb.form.editor/.src/_TextEditor_Line.class @@ -44,10 +44,12 @@ Private Sub Text_Write(Value As String) With GetView() If ._GetDocument().Lines[_Line] <> Value Then + ._SaveCursor .Begin .Remove(0, _Line, String.Len(._GetDocument().Lines[_Line]), _Line) .Insert(Value) .End + ._RestoreCursor Endif End With diff --git a/comp/src/gb.form/.src/Color/ColorPalette.class b/comp/src/gb.form/.src/Color/ColorPalette.class index c1c496c7d..e2af5e387 100644 --- a/comp/src/gb.form/.src/Color/ColorPalette.class +++ b/comp/src/gb.form/.src/Color/ColorPalette.class @@ -206,6 +206,7 @@ Public Sub View_MouseMove() If I = $iIndex Then Return $iIndex = I + 'Debug I $iLastIndex = $iIndex If I >= 0 Then @@ -264,6 +265,7 @@ Public Sub View_Leave() If $iIndex >= 0 Then $iIndex = -1 + 'Debug -1 $hView.Refresh Endif diff --git a/main/lib/gui.qt.webkit/control/webview.png b/main/lib/gui.qt.webkit/control/webview.png deleted file mode 120000 index b8734ada7..000000000 --- a/main/lib/gui.qt.webkit/control/webview.png +++ /dev/null @@ -1 +0,0 @@ -../../../../gb.qt4/src/webkit/control/webview.png \ No newline at end of file