Skip to content

Commit

Permalink
0.9.30 beta - see change log
Browse files Browse the repository at this point in the history
  • Loading branch information
Androthi committed Sep 2, 2021
1 parent d0e39c0 commit da2afe4
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 15 deletions.
11 changes: 9 additions & 2 deletions CHANGE_LOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# Change Log

## 08/27/2021
0.9.21 - fixed a mouse behavior issue when in marked selection mode
## 09/01/2021
0.9.30 - case changing options now maintain selection, and single action case
changes no longer advance cursor.
- fixed ctrl-HOME and ctrl-END to navigate to top and bottom of document
- fixed Recent Files menu, now updates as soon as you save a new file
- added copy word and delete word to edit menu
- fixed a mouse behavior issue when in marked selection mode
- any insert change should now deactivate marked selection mode as it should

## 08/27/2021
0.9.20 feature changes:
- added option for settings Default Extension=
allows setting the default extension that SavageEd appends to
Expand Down
7 changes: 5 additions & 2 deletions src/SavageEd.hhf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

readonly

version :string := "SavageEd v0.9.21";
version :string := "SavageEd v0.9.30";

type
// Message and dispatch table related definitions:
Expand Down Expand Up @@ -149,7 +149,10 @@ type
IDM_TO_UPPER,
IDM_TO_LOWER,
IDM_INCREASE_INDENT,
IDM_DECREASE_INDENT
IDM_DECREASE_INDENT,
IDM_COPY_WORD,
IDM_DELETE_WORD,
IDM_KILL_LINE
};

rect_t:
Expand Down
53 changes: 42 additions & 11 deletions src/SavageEd.hla
Original file line number Diff line number Diff line change
Expand Up @@ -794,16 +794,28 @@ proc
mov( true, proc_return );

case( w.VK_END )
if( shift_down ) then
command_select_to_eol();
else
command_move_to_eol();
if( ! ctrl_down ) then
if( shift_down ) then
command_select_to_eol();
else
command_move_to_eol();
endif;
jmp skip_proc;
endif;
or( 1, eax );
clear_keystate();
w.CallWindowProc(info.old_proc, info.hred, w.WM_KEYDOWN, w.VK_END, 0 );
jmp skip_proc;

case( w.VK_HOME )

command_move_to_bol();
if( !ctrl_down ) then
command_move_to_bol();
jmp skip_proc;
endif;
or( 1, eax );
clear_keystate();
w.CallWindowProc(info.old_proc, info.hred, w.WM_KEYDOWN, w.VK_HOME, 0 );
jmp skip_proc;

case( w.VK_SPACE )
Expand Down Expand Up @@ -1503,11 +1515,17 @@ proc

end command_selection_to_string;

command_lowercase_selection :procedure {@noframe};
command_lowercase_selection :procedure;
var
start_index :dword;
end_index :dword;
begin command_lowercase_selection;
pushad();
getInfo( info );
mov( info.cursor.start_index, eax );
mov( eax, start_index );
mov( info.cursor.end_index, end_index );

if( eax = info.cursor.end_index ) then
inc( info.cursor.end_index );
w.SendMessage( info.hred, w.EM_SETSEL, info.cursor.start_index, info.cursor.end_index );
Expand All @@ -1517,15 +1535,20 @@ proc
str.lower1( esi );
w.SendMessage( info.hred, w.EM_REPLACESEL, true, esi );
str.free( esi );
w.SendMessage( info.hred, w.EM_SETSEL, start_index, end_index );
popad();
ret();
end command_lowercase_selection;

command_uppercase_selection :procedure {@noframe};
command_uppercase_selection :procedure;
var
start_index :dword;
end_index :dword;
begin command_uppercase_selection;
pushad();
getInfo( info );
mov( info.cursor.start_index, eax );
mov( eax, start_index );
mov( info.cursor.end_index, end_index );
if( eax = info.cursor.end_index ) then
inc( info.cursor.end_index );
w.SendMessage( info.hred, w.EM_SETSEL, info.cursor.start_index, info.cursor.end_index );
Expand All @@ -1535,8 +1558,8 @@ proc
str.upper1( esi );
w.SendMessage( info.hred, w.EM_REPLACESEL, true, esi );
str.free( esi );
w.SendMessage( info.hred, w.EM_SETSEL, start_index, end_index );
popad();
ret();
end command_uppercase_selection;

command_edit_ini :procedure;
Expand Down Expand Up @@ -2076,10 +2099,18 @@ proc
w.SendMessage(info.hred, w.WM_PASTE,0,0);
w.SendMessage(info.hred, w.EM_SETMODIFY, true,0);

case( IDM_SELECTALL )

case( IDM_SELECTALL )
command_select_all();

case( IDM_COPY_WORD )
command_copy_word();

case( IDM_DELETE_WORD )
command_delete_word();

case( IDM_KILL_LINE )
command_cut_line();

case( IDM_UNDO )

w.SendMessage(info.hred, w.EM_UNDO,0,0);
Expand Down
4 changes: 4 additions & 0 deletions src/Window.hla
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,9 @@ proc
w.AppendMenu( edit_menu, w.MF_STRING, IDM_COPY, "C&opy Ctrl+C");
w.AppendMenu( edit_menu, w.MF_STRING, IDM_PASTE, "&Paste Ctrl+V");
w.AppendMenu( edit_menu, w.MF_STRING, IDM_SELECTALL, "Select &All Ctrl+A");
w.AppendMenu( edit_menu, w.MF_STRING, IDM_COPY_WORD, "Copy Word Shift+Ctrl+W");
w.AppendMenu( edit_menu, w.MF_STRING, IDM_DELETE_WORD, "Delete Word Ctrl+W");
w.AppendMenu( edit_menu, w.MF_STRING, IDM_KILL_LINE, "Kill Line Ctrl+\");
w.AppendMenu( edit_menu, w.MF_SEPARATOR, NULL, NULL);
w.AppendMenu( edit_menu, w.MF_STRING, IDM_TO_UPPER, "To Upper Case Ctrl+U");
w.AppendMenu( edit_menu, w.MF_STRING, IDM_TO_LOWER, "To Lower Case Shift+Ctrl+U");
Expand Down Expand Up @@ -1372,6 +1375,7 @@ proc
config.deleteItem( s_recent, 20 );

endif;
updateMenu();
ret();
end updateRecentLog;

Expand Down

0 comments on commit da2afe4

Please sign in to comment.