Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new hotkeys #219

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 51 additions & 31 deletions source/ide/ide_methods.bas
Original file line number Diff line number Diff line change
Expand Up @@ -896,34 +896,6 @@ FUNCTION ide2 (ignore)

idefocusline = 0





























'main loop
DO
ideloop:
Expand Down Expand Up @@ -1821,13 +1793,17 @@ FUNCTION ide2 (ignore)
GOTO ideQuickKeycode
END IF


IF KCTRL AND KB = KEY_F3 THEN
'Control+F3
'Find dialog
IF KCTRL and KB = KEY_F3 THEN
IF IdeSystem = 3 THEN IdeSystem = 1
GOTO idefindjmp
END IF

IF KALT AND KB = KEY_F3 THEN
'Alt+F3
'Control+H
'Find and replace
IF (KALT AND KB = KEY_F3) OR (KCTRL AND UCASE$(K$)="H") THEN
IF IdeSystem = 3 THEN IdeSystem = 1
GOTO idefindchangejmp
END IF
Expand Down Expand Up @@ -3436,6 +3412,50 @@ FUNCTION ide2 (ignore)

END IF

'Control+L
'Delete Line
if KCONTROL AND UCASE$(K$) = "L" THEN

' DEBUG
' _console on
' _echo "ideselect=" + str$(ideselect)
' _echo "idecx=" + str$(idecx)
' _echo "idecy=" + str$(idecy)
' _echo "idesx=" + str$(idesx)
' _echo "idesy=" + str$(idesy)
' _echo "ideselectx1=" + str$(ideselectx1)
' _echo "ideselecty1=" + str$(ideselecty1)
' _echo "idel=" + str$(idel)
' _echo "ideli=" + str$(ideli)
' _echo "iden=" + str$(iden)
' _echo ""
'
if ideselect then
' get total number of lines to delete
del_count = abs(idecy - ideselecty1) + 1
' make sure we get the top line selected in case user selected bottom-up
if idecy < ideselecty1 then
del_y = idecy
else
del_y = ideselecty1
end if
else
del_count= 1
del_y = idecy
end if

' delete all selected lines
for del_n = 1 to del_count
if iden > 1 then
idedelline del_y
else
idesetline del_y, ""
endif
idecy = del_y
if idecy > iden then idecy = iden
ideselect = 0
next
endif

IF KCONTROL AND UCASE$(K$) = "Y" THEN 'redo (CTRL+Y)
idemredo:
Expand Down