[GB.FORM.EDITOR]

* NEW: TextEditor: Ctrl+Delete now deletes the word right to the cursor.


git-svn-id: svn://localhost/gambas/trunk@7158 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2015-06-29 19:24:19 +00:00
parent 566e06abfe
commit 3fda289f8c
3 changed files with 27 additions and 3 deletions

View file

@ -1334,7 +1334,10 @@ Public Sub View_KeyPress()
Endif
Case Key.Delete
If Key.Normal Then
If Key.Control Then
If $bReadOnly Then Goto STOP_EVENT
DeleteWordRight
Else If Key.Normal Then
If $bReadOnly Then Goto STOP_EVENT
DeleteRight
Endif
@ -1940,6 +1943,27 @@ Private Sub DeleteWordLeft()
End
Private Sub DeleteWordRight()
Dim X As Integer
If DeleteSelection() Then Return
If $X >= $hDoc.LineLength[$Y] Then
DeleteRight
Return
Endif
X = $hDoc.WordRight($X, $Y)
If X = $X Then Return
Begin()
Goto(X, $Y, True)
DeleteSelection()
End()
End
Private Sub DeleteRight()

View file

@ -2,6 +2,6 @@
Public Sub Main()
'Print Markdown.ToHTML(File.Load("~page"))
'Print Markdown.ToHTML(File.Load("test.txt"))
End

View file

@ -1377,8 +1377,8 @@ int EXPORT GB_INIT(void)
}
else
{
GB.Component.Declare(TrayIconsDesc);
GB.Component.Declare(TrayIconDesc);
GB.Component.Declare(TrayIconsDesc);
}
CLASS_Control = GB.FindClass("Control");