Rev 595 | Rev 629 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 595 | Rev 617 | ||
---|---|---|---|
Line 107... | Line 107... | ||
107 | inc dword[esp+4] |
107 | inc dword[esp+4] |
108 | mov eax,1 |
108 | mov eax,1 |
109 | jmp key.tab.direct |
109 | jmp key.tab.direct |
Line 110... | Line 110... | ||
110 | 110 | ||
111 | ;----------------------------------------------------------------------------- |
111 | ;----------------------------------------------------------------------------- |
112 | func key.ctrl_a ;///// SELECT ALL DOCUMENT /////////////////////////////////// |
112 | proc key.ctrl_a ;///// SELECT ALL DOCUMENT /////////////////////////////////// |
113 | ;----------------------------------------------------------------------------- |
113 | ;----------------------------------------------------------------------------- |
114 | xor eax,eax |
114 | xor eax,eax |
115 | mov [cur_editor.SelStart.X],eax |
115 | mov [cur_editor.SelStart.X],eax |
116 | mov [cur_editor.SelStart.Y],eax |
116 | mov [cur_editor.SelStart.Y],eax |
Line 120... | Line 120... | ||
120 | call get_line_offset |
120 | call get_line_offset |
121 | call get_real_length |
121 | call get_real_length |
122 | mov [cur_editor.Caret.X],eax |
122 | mov [cur_editor.Caret.X],eax |
123 | call draw_editor |
123 | call draw_editor |
124 | ret |
124 | ret |
125 | endf |
125 | endp |
Line 126... | Line 126... | ||
126 | 126 | ||
127 | ;----------------------------------------------------------------------------- |
127 | ;----------------------------------------------------------------------------- |
128 | func key.ctrl_o ;///// ENTER OPEN FILENAME /////////////////////////////////// |
128 | proc key.ctrl_o ;///// ENTER OPEN FILENAME /////////////////////////////////// |
129 | ;----------------------------------------------------------------------------- |
129 | ;----------------------------------------------------------------------------- |
Line 130... | Line 130... | ||
130 | mov [bot_dlg_mode2],0 |
130 | mov [bot_dlg_mode2],0 |
131 | 131 | ||
Line 147... | Line 147... | ||
147 | mov [tb_opensave.pos.x],al |
147 | mov [tb_opensave.pos.x],al |
148 | mov [tb_opensave.sel.x],0 |
148 | mov [tb_opensave.sel.x],0 |
149 | mov [tb_casesen],0;1 |
149 | mov [tb_casesen],0;1 |
150 | call drawwindow |
150 | call drawwindow |
151 | ret |
151 | ret |
152 | endf |
152 | endp |
Line 153... | Line 153... | ||
153 | 153 | ||
154 | ;----------------------------------------------------------------------------- |
154 | ;----------------------------------------------------------------------------- |
155 | func key.ctrl_s ;///// ENTER SAVE FILENAME /////////////////////////////////// |
155 | proc key.ctrl_s ;///// ENTER SAVE FILENAME /////////////////////////////////// |
156 | ;----------------------------------------------------------------------------- |
156 | ;----------------------------------------------------------------------------- |
157 | cmp [cur_editor.FilePath], 0 |
157 | cmp [cur_editor.FilePath], 0 |
158 | je key.shift_ctrl_s |
158 | je key.shift_ctrl_s |
159 | cmp [cur_editor.Modified],0 |
159 | cmp [cur_editor.Modified],0 |
Line 164... | Line 164... | ||
164 | ret |
164 | ret |
Line 165... | Line 165... | ||
165 | 165 | ||
166 | key.shift_ctrl_s: |
166 | key.shift_ctrl_s: |
167 | mov [bot_dlg_mode2],1 |
167 | mov [bot_dlg_mode2],1 |
168 | jmp key.ctrl_o.direct |
168 | jmp key.ctrl_o.direct |
Line 169... | Line 169... | ||
169 | endf |
169 | endp |
170 | 170 | ||
171 | ;----------------------------------------------------------------------------- |
171 | ;----------------------------------------------------------------------------- |
172 | func key.ctrl_n ;///// CREATE NEW FILE (TAB) ///////////////////////////////// |
172 | proc key.ctrl_n ;///// CREATE NEW FILE (TAB) ///////////////////////////////// |
173 | ;----------------------------------------------------------------------------- |
173 | ;----------------------------------------------------------------------------- |
174 | call create_tab |
174 | call create_tab |
Line 175... | Line 175... | ||
175 | ret |
175 | ret |
176 | endf |
176 | endp |
177 | 177 | ||
178 | ;----------------------------------------------------------------------------- |
178 | ;----------------------------------------------------------------------------- |
179 | func key.ctrl_f ;///// ENTER KEYWORD TO FIND ///////////////////////////////// |
179 | proc key.ctrl_f ;///// ENTER KEYWORD TO FIND ///////////////////////////////// |
Line 180... | Line 180... | ||
180 | ;----------------------------------------------------------------------------- |
180 | ;----------------------------------------------------------------------------- |
Line 200... | Line 200... | ||
200 | mov [tb_find.pos.x],al |
200 | mov [tb_find.pos.x],al |
201 | mov [tb_find.sel.x],0 |
201 | mov [tb_find.sel.x],0 |
202 | mov [tb_casesen],0 |
202 | mov [tb_casesen],0 |
203 | call drawwindow |
203 | call drawwindow |
204 | ret |
204 | ret |
205 | endf |
205 | endp |
Line 206... | Line 206... | ||
206 | 206 | ||
207 | func key.ctrl_h |
207 | proc key.ctrl_h |
208 | mov [bot_dlg_mode2],1 |
208 | mov [bot_dlg_mode2],1 |
Line 209... | Line 209... | ||
209 | mov [bot_dlg_height],16*3+4*2+1 |
209 | mov [bot_dlg_height],16*3+4*2+1 |
Line 210... | Line 210... | ||
210 | 210 | ||
211 | mov [s_status],s_enter_text_to_replace |
211 | mov [s_status],s_enter_text_to_replace |
Line 212... | Line 212... | ||
212 | 212 | ||
213 | jmp key.ctrl_f.direct |
213 | jmp key.ctrl_f.direct |
214 | endf |
214 | endp |
215 | 215 | ||
216 | func key.ctrl_g |
216 | proc key.ctrl_g |
Line 228... | Line 228... | ||
228 | mov [tb_gotorow.sel.x],0 |
228 | mov [tb_gotorow.sel.x],0 |
229 | mov [tb_casesen],0 |
229 | mov [tb_casesen],0 |
230 | call drawwindow |
230 | call drawwindow |
231 | ret |
231 | ret |
232 | ^@ |
232 | ^@ |
233 | endf |
233 | endp |
Line 234... | Line 234... | ||
234 | 234 | ||
235 | ;----------------------------------------------------------------------------- |
235 | ;----------------------------------------------------------------------------- |
236 | func key.ctrl_left ;///// GO TO PREVIOUS WORD //////////////////////////////// |
236 | proc key.ctrl_left ;///// GO TO PREVIOUS WORD //////////////////////////////// |
237 | ;----------------------------------------------------------------------------- |
237 | ;----------------------------------------------------------------------------- |
Line 238... | Line 238... | ||
238 | call clear_selection |
238 | call clear_selection |
239 | 239 | ||
Line 321... | Line 321... | ||
321 | mov [cur_editor.TopLeft.X],edx |
321 | mov [cur_editor.TopLeft.X],edx |
322 | .exit: |
322 | .exit: |
323 | call editor_check_for_changes |
323 | call editor_check_for_changes |
324 | .exit.2: |
324 | .exit.2: |
325 | ret |
325 | ret |
326 | endf |
326 | endp |
Line 327... | Line 327... | ||
327 | 327 | ||
328 | ;----------------------------------------------------------------------------- |
328 | ;----------------------------------------------------------------------------- |
329 | func key.ctrl_right ;///// GO TO NEXT WORD /////////////////////////////////// |
329 | proc key.ctrl_right ;///// GO TO NEXT WORD /////////////////////////////////// |
330 | ;----------------------------------------------------------------------------- |
330 | ;----------------------------------------------------------------------------- |
Line 331... | Line 331... | ||
331 | call clear_selection |
331 | call clear_selection |
332 | 332 | ||
Line 410... | Line 410... | ||
410 | mov [cur_editor.TopLeft.X],edx |
410 | mov [cur_editor.TopLeft.X],edx |
411 | .exit: |
411 | .exit: |
412 | call editor_check_for_changes |
412 | call editor_check_for_changes |
413 | .exit.2: |
413 | .exit.2: |
414 | ret |
414 | ret |
415 | endf |
415 | endp |
Line 416... | Line 416... | ||
416 | 416 | ||
417 | ;----------------------------------------------------------------------------- |
417 | ;----------------------------------------------------------------------------- |
418 | func key.ctrl_x |
418 | proc key.ctrl_x |
419 | cmp [sel.selected],0 |
419 | cmp [sel.selected],0 |
420 | je @f |
420 | je @f |
421 | call key.ctrl_c |
421 | call key.ctrl_c |
422 | call key.del |
422 | call key.del |
423 | mov [cur_editor.Modified],1 |
423 | mov [cur_editor.Modified],1 |
424 | @@: ret |
424 | @@: ret |
Line 425... | Line 425... | ||
425 | endf |
425 | endp |
426 | 426 | ||
427 | ;----------------------------------------------------------------------------- |
427 | ;----------------------------------------------------------------------------- |
428 | func key.ctrl_c |
428 | proc key.ctrl_c |
429 | mov [copy_size],0 |
429 | mov [copy_size],0 |
Line 430... | Line 430... | ||
430 | cmp [sel.selected],0 |
430 | cmp [sel.selected],0 |
431 | je .exit |
- | |
432 | - | ||
433 | call get_selection_size |
431 | je .exit |
434 | mov ebx,eax |
432 | |
Line 435... | Line 433... | ||
435 | mov eax,[copy_buf] |
433 | call get_selection_size |
436 | call mem.ReAlloc |
434 | stdcall mem.ReAlloc,[copy_buf],eax |
437 | mov [copy_buf],eax |
435 | mov [copy_buf],eax |
Line 516... | Line 514... | ||
516 | mov ecx,eax |
514 | mov ecx,eax |
517 | mov al,' ' |
515 | mov al,' ' |
518 | jecxz @b |
516 | jecxz @b |
519 | rep stosb |
517 | rep stosb |
520 | jmp @b |
518 | jmp @b |
521 | endf |
519 | endp |
Line 522... | Line 520... | ||
522 | 520 | ||
523 | ;----------------------------------------------------------------------------- |
521 | ;----------------------------------------------------------------------------- |
524 | func key.ctrl_v |
522 | proc key.ctrl_v |
525 | cmp [copy_size],0 |
523 | cmp [copy_size],0 |
Line 526... | Line 524... | ||
526 | je .exit |
524 | je .exit |
Line 527... | Line 525... | ||
527 | 525 | ||
528 | call delete_selection |
526 | call delete_selection |
Line 529... | Line -... | ||
529 | - | ||
530 | mov eax,[copy_size] |
527 | |
531 | call editor_realloc_lines |
528 | mov eax,[copy_size] |
532 | 529 | call editor_realloc_lines |
|
533 | mov eax,[cur_editor.Lines] |
530 | |
534 | mov ebx,[cur_editor.Lines.Size] |
531 | mov ebx,[cur_editor.Lines.Size] |
Line 535... | Line 532... | ||
535 | add ebx,[copy_size] |
532 | add ebx,[copy_size] |
536 | mov [cur_editor.Lines.Size],ebx |
533 | mov [cur_editor.Lines.Size],ebx |
537 | call mem.ReAlloc |
534 | stdcall mem.ReAlloc,[cur_editor.Lines],ebx |
Line 633... | Line 630... | ||
633 | cmp eax,[cur_editor.Columns.Count] |
630 | cmp eax,[cur_editor.Columns.Count] |
634 | jbe @f |
631 | jbe @f |
635 | mov [cur_editor.Columns.Count],eax |
632 | mov [cur_editor.Columns.Count],eax |
636 | @@: pop eax |
633 | @@: pop eax |
637 | ret |
634 | ret |
638 | endf |
635 | endp |
Line 639... | Line 636... | ||
639 | 636 | ||
640 | ;----------------------------------------------------------------------------- |
637 | ;----------------------------------------------------------------------------- |
641 | func key.ctrl_d ;///// INSERT SEPARATOR ////////////////////////////////////// |
638 | proc key.ctrl_d ;///// INSERT SEPARATOR ////////////////////////////////////// |
642 | ;----------------------------------------------------------------------------- |
639 | ;----------------------------------------------------------------------------- |
643 | mov eax,94 |
640 | mov eax,94 |
Line 644... | Line 641... | ||
644 | call editor_realloc_lines |
641 | call editor_realloc_lines |
Line 672... | Line 669... | ||
672 | 669 | ||
Line 673... | Line 670... | ||
673 | mov [cur_editor.Modified],1 |
670 | mov [cur_editor.Modified],1 |
674 | 671 | ||
675 | .exit: |
672 | .exit: |
Line 676... | Line 673... | ||
676 | ret |
673 | ret |
677 | endf |
674 | endp |
678 | 675 | ||
679 | ;----------------------------------------------------------------------------- |
676 | ;----------------------------------------------------------------------------- |
680 | func key.ctrl_y ;///// DELETE CURRENT LINE /////////////////////////////////// |
677 | proc key.ctrl_y ;///// DELETE CURRENT LINE /////////////////////////////////// |
681 | ;----------------------------------------------------------------------------- |
678 | ;----------------------------------------------------------------------------- |
682 | mov eax,[cur_editor.Caret.Y] |
679 | mov eax,[cur_editor.Caret.Y] |
Line 710... | Line 707... | ||
710 | 707 | ||
Line 711... | Line 708... | ||
711 | mov [cur_editor.Modified],1 |
708 | mov [cur_editor.Modified],1 |
712 | 709 | ||
713 | .exit: |
710 | .exit: |
Line 714... | Line 711... | ||
714 | ret |
711 | ret |
715 | endf |
712 | endp |
716 | 713 | ||
717 | ;----------------------------------------------------------------------------- |
714 | ;----------------------------------------------------------------------------- |
Line 718... | Line 715... | ||
718 | func key.up ;///// GO TO PREVIOUS LINE /////////////////////////////////////// |
715 | proc key.up ;///// GO TO PREVIOUS LINE /////////////////////////////////////// |
719 | ;----------------------------------------------------------------------------- |
716 | ;----------------------------------------------------------------------------- |
Line 738... | Line 735... | ||
738 | @@: mov [cur_editor.Caret.Y],eax |
735 | @@: mov [cur_editor.Caret.Y],eax |
739 | mov [cur_editor.TopLeft.Y],ecx |
736 | mov [cur_editor.TopLeft.Y],ecx |
Line 740... | Line 737... | ||
740 | 737 | ||
741 | .exit: |
738 | .exit: |
742 | ret |
739 | ret |
Line 743... | Line 740... | ||
743 | endf |
740 | endp |
744 | 741 | ||
745 | ;----------------------------------------------------------------------------- |
742 | ;----------------------------------------------------------------------------- |
746 | func key.down ;///// GO TO NEXT LINE ///////////////////////////////////////// |
743 | proc key.down ;///// GO TO NEXT LINE ///////////////////////////////////////// |
Line 747... | Line 744... | ||
747 | ;----------------------------------------------------------------------------- |
744 | ;----------------------------------------------------------------------------- |
748 | call clear_selection |
745 | call clear_selection |
Line 768... | Line 765... | ||
768 | @@: mov [cur_editor.Caret.Y],eax |
765 | @@: mov [cur_editor.Caret.Y],eax |
769 | mov [cur_editor.TopLeft.Y],ecx |
766 | mov [cur_editor.TopLeft.Y],ecx |
Line 770... | Line 767... | ||
770 | 767 | ||
771 | .exit: |
768 | .exit: |
772 | ret |
769 | ret |
Line 773... | Line 770... | ||
773 | endf |
770 | endp |
774 | 771 | ||
775 | ;----------------------------------------------------------------------------- |
772 | ;----------------------------------------------------------------------------- |
776 | func key.left ;///// GO TO PREVIOUS CHAR ///////////////////////////////////// |
773 | proc key.left ;///// GO TO PREVIOUS CHAR ///////////////////////////////////// |
Line 777... | Line 774... | ||
777 | ;----------------------------------------------------------------------------- |
774 | ;----------------------------------------------------------------------------- |
778 | call clear_selection |
775 | call clear_selection |
Line 789... | Line 786... | ||
789 | mov [cur_editor.SelStart.X],eax |
786 | mov [cur_editor.SelStart.X],eax |
790 | @@: mov [cur_editor.Caret.X],eax |
787 | @@: mov [cur_editor.Caret.X],eax |
Line 791... | Line 788... | ||
791 | 788 | ||
792 | .exit: |
789 | .exit: |
793 | ret |
790 | ret |
Line 794... | Line 791... | ||
794 | endf |
791 | endp |
795 | 792 | ||
796 | ;----------------------------------------------------------------------------- |
793 | ;----------------------------------------------------------------------------- |
797 | func key.right ;///// GO TO NEXT CHAR //////////////////////////////////////// |
794 | proc key.right ;///// GO TO NEXT CHAR //////////////////////////////////////// |
Line 798... | Line 795... | ||
798 | ;----------------------------------------------------------------------------- |
795 | ;----------------------------------------------------------------------------- |
799 | call clear_selection |
796 | call clear_selection |
Line 811... | Line 808... | ||
811 | mov [cur_editor.SelStart.X],eax |
808 | mov [cur_editor.SelStart.X],eax |
812 | @@: mov [cur_editor.Caret.X],eax |
809 | @@: mov [cur_editor.Caret.X],eax |
Line 813... | Line 810... | ||
813 | 810 | ||
814 | .exit: |
811 | .exit: |
815 | ret |
812 | ret |
Line 816... | Line 813... | ||
816 | endf |
813 | endp |
817 | 814 | ||
818 | ;----------------------------------------------------------------------------- |
815 | ;----------------------------------------------------------------------------- |
819 | func key.pgup ;///// GO TO PREVIOUS PAGE ///////////////////////////////////// |
816 | proc key.pgup ;///// GO TO PREVIOUS PAGE ///////////////////////////////////// |
Line 820... | Line 817... | ||
820 | ;----------------------------------------------------------------------------- |
817 | ;----------------------------------------------------------------------------- |
821 | call clear_selection |
818 | call clear_selection |
Line 839... | Line 836... | ||
839 | @@: mov [cur_editor.Caret.Y],eax |
836 | @@: mov [cur_editor.Caret.Y],eax |
840 | mov [cur_editor.TopLeft.Y],ecx |
837 | mov [cur_editor.TopLeft.Y],ecx |
Line 841... | Line 838... | ||
841 | 838 | ||
842 | .exit: |
839 | .exit: |
843 | ret |
840 | ret |
Line 844... | Line 841... | ||
844 | endf |
841 | endp |
845 | 842 | ||
846 | ;----------------------------------------------------------------------------- |
843 | ;----------------------------------------------------------------------------- |
847 | func key.pgdn ;///// GO TO NEXT PAGE ///////////////////////////////////////// |
844 | proc key.pgdn ;///// GO TO NEXT PAGE ///////////////////////////////////////// |
Line 848... | Line 845... | ||
848 | ;----------------------------------------------------------------------------- |
845 | ;----------------------------------------------------------------------------- |
849 | call clear_selection |
846 | call clear_selection |
Line 867... | Line 864... | ||
867 | @@: mov [cur_editor.Caret.Y],eax |
864 | @@: mov [cur_editor.Caret.Y],eax |
868 | mov [cur_editor.TopLeft.Y],ecx |
865 | mov [cur_editor.TopLeft.Y],ecx |
Line 869... | Line 866... | ||
869 | 866 | ||
870 | .exit: |
867 | .exit: |
871 | ret |
868 | ret |
Line 872... | Line 869... | ||
872 | endf |
869 | endp |
873 | 870 | ||
874 | ;----------------------------------------------------------------------------- |
871 | ;----------------------------------------------------------------------------- |
875 | func key.home ;///// GO TO LINE START //////////////////////////////////////// |
872 | proc key.home ;///// GO TO LINE START //////////////////////////////////////// |
Line 876... | Line 873... | ||
876 | ;----------------------------------------------------------------------------- |
873 | ;----------------------------------------------------------------------------- |
877 | call clear_selection |
874 | call clear_selection |
Line 885... | Line 882... | ||
885 | mov [cur_editor.SelStart.X],0 |
882 | mov [cur_editor.SelStart.X],0 |
886 | @@: |
883 | @@: |
Line 887... | Line 884... | ||
887 | 884 | ||
888 | .exit: |
885 | .exit: |
889 | ret |
886 | ret |
Line 890... | Line 887... | ||
890 | endf |
887 | endp |
891 | 888 | ||
892 | ;----------------------------------------------------------------------------- |
889 | ;----------------------------------------------------------------------------- |
893 | func key.end ;///// GO TO LINE END /////////////////////////////////////////// |
890 | proc key.end ;///// GO TO LINE END /////////////////////////////////////////// |
Line 894... | Line 891... | ||
894 | ;----------------------------------------------------------------------------- |
891 | ;----------------------------------------------------------------------------- |
895 | call clear_selection |
892 | call clear_selection |
Line 906... | Line 903... | ||
906 | mov [cur_editor.SelStart.X],eax |
903 | mov [cur_editor.SelStart.X],eax |
907 | @@: |
904 | @@: |
Line 908... | Line 905... | ||
908 | 905 | ||
909 | .exit: |
906 | .exit: |
910 | ret |
907 | ret |
Line 911... | Line 908... | ||
911 | endf |
908 | endp |
912 | 909 | ||
913 | ;----------------------------------------------------------------------------- |
910 | ;----------------------------------------------------------------------------- |
914 | func key.ctrl_home ;///// GO TO PAGE START /////////////////////////////////// |
911 | proc key.ctrl_home ;///// GO TO PAGE START /////////////////////////////////// |
Line 915... | Line 912... | ||
915 | ;----------------------------------------------------------------------------- |
912 | ;----------------------------------------------------------------------------- |
916 | call clear_selection |
913 | call clear_selection |
Line 926... | Line 923... | ||
926 | @@: mov [cur_editor.Caret.Y],eax |
923 | @@: mov [cur_editor.Caret.Y],eax |
927 | mov [cur_editor.TopLeft.Y],ecx |
924 | mov [cur_editor.TopLeft.Y],ecx |
Line 928... | Line 925... | ||
928 | 925 | ||
929 | .exit: |
926 | .exit: |
930 | ret |
927 | ret |
Line 931... | Line 928... | ||
931 | endf |
928 | endp |
932 | 929 | ||
933 | ;----------------------------------------------------------------------------- |
930 | ;----------------------------------------------------------------------------- |
934 | func key.ctrl_end ;///// GO TO PAGE END ////////////////////////////////////// |
931 | proc key.ctrl_end ;///// GO TO PAGE END ////////////////////////////////////// |
Line 935... | Line 932... | ||
935 | ;----------------------------------------------------------------------------- |
932 | ;----------------------------------------------------------------------------- |
936 | call clear_selection |
933 | call clear_selection |
Line 951... | Line 948... | ||
951 | @@: mov [cur_editor.Caret.Y],eax |
948 | @@: mov [cur_editor.Caret.Y],eax |
952 | mov [cur_editor.TopLeft.Y],ecx |
949 | mov [cur_editor.TopLeft.Y],ecx |
Line 953... | Line 950... | ||
953 | 950 | ||
954 | .exit: |
951 | .exit: |
955 | ret |
952 | ret |
Line 956... | Line 953... | ||
956 | endf |
953 | endp |
957 | 954 | ||
958 | ;----------------------------------------------------------------------------- |
955 | ;----------------------------------------------------------------------------- |
959 | func key.ctrl_pgup ;///// GO TO DOCUMENT START /////////////////////////////// |
956 | proc key.ctrl_pgup ;///// GO TO DOCUMENT START /////////////////////////////// |
Line 960... | Line 957... | ||
960 | ;----------------------------------------------------------------------------- |
957 | ;----------------------------------------------------------------------------- |
961 | call clear_selection |
958 | call clear_selection |
Line 971... | Line 968... | ||
971 | mov [cur_editor.SelStart.Y],eax |
968 | mov [cur_editor.SelStart.Y],eax |
972 | @@: |
969 | @@: |
Line 973... | Line 970... | ||
973 | 970 | ||
974 | .exit: |
971 | .exit: |
975 | ret |
972 | ret |
Line 976... | Line 973... | ||
976 | endf |
973 | endp |
977 | 974 | ||
978 | ;----------------------------------------------------------------------------- |
975 | ;----------------------------------------------------------------------------- |
979 | func key.ctrl_pgdn ;///// GO TO DOCUMENT END ///////////////////////////////// |
976 | proc key.ctrl_pgdn ;///// GO TO DOCUMENT END ///////////////////////////////// |
Line 980... | Line 977... | ||
980 | ;----------------------------------------------------------------------------- |
977 | ;----------------------------------------------------------------------------- |
981 | call clear_selection |
978 | call clear_selection |
Line 995... | Line 992... | ||
995 | m2m [cur_editor.SelStart.Y],[cur_editor.Caret.Y] |
992 | m2m [cur_editor.SelStart.Y],[cur_editor.Caret.Y] |
996 | @@: |
993 | @@: |
Line 997... | Line 994... | ||
997 | 994 | ||
998 | .exit: |
995 | .exit: |
999 | ret |
996 | ret |
Line 1000... | Line 997... | ||
1000 | endf |
997 | endp |
1001 | 998 | ||
1002 | ;----------------------------------------------------------------------------- |
999 | ;----------------------------------------------------------------------------- |
1003 | func key.del ;///// DELETE NEXT CHAR OR SELECTION //////////////////////////// |
1000 | proc key.del ;///// DELETE NEXT CHAR OR SELECTION //////////////////////////// |
1004 | ;----------------------------------------------------------------------------- |
1001 | ;----------------------------------------------------------------------------- |
Line 1005... | Line 1002... | ||
1005 | call delete_selection |
1002 | call delete_selection |
Line 1137... | Line 1134... | ||
1137 | 1134 | ||
Line 1138... | Line 1135... | ||
1138 | mov [cur_editor.Modified],1 |
1135 | mov [cur_editor.Modified],1 |
1139 | 1136 | ||
1140 | .exit: |
1137 | .exit: |
Line 1141... | Line 1138... | ||
1141 | ret |
1138 | ret |
1142 | endf |
- | |
1143 | 1139 | endp |
|
- | 1140 | ||
1144 | ;----------------------------------------------------------------------------- |
1141 | ;----------------------------------------------------------------------------- |
1145 | key.ins: |
1142 | proc key.ins ;///// TOGGLE INSERT/OVERWRITE MODE ///////////////////////////// |
1146 | ;// ... toggle insert/overwrite mode here ... |
1143 | ;----------------------------------------------------------------------------- |
1147 | xor [ins_mode],1 |
1144 | xor [ins_mode],1 |
1148 | mov eax,[cur_editor.Caret.Y] |
1145 | mov eax,[cur_editor.Caret.Y] |
1149 | mov ebx,eax |
1146 | mov ebx,eax |
- | 1147 | call draw_editor_text.part |
|
Line 1150... | Line 1148... | ||
1150 | call draw_editor_text.part |
1148 | call draw_editor_caret |
1151 | call draw_editor_caret |
1149 | ret |
1152 | ret |
1150 | endp |
1153 | 1151 | ||
1154 | ;----------------------------------------------------------------------------- |
1152 | ;----------------------------------------------------------------------------- |
Line 1155... | Line 1153... | ||
1155 | func key.bkspace ;///// DELETE PREVIOUS CHAR OR SELECTION //////////////////// |
1153 | proc key.bkspace ;///// DELETE PREVIOUS CHAR OR SELECTION //////////////////// |
Line 1210... | Line 1208... | ||
1210 | jg @b |
1208 | jg @b |
1211 | @@: mov [cur_editor.Caret.X],ecx |
1209 | @@: mov [cur_editor.Caret.X],ecx |
1212 | dec [cur_editor.Caret.Y] |
1210 | dec [cur_editor.Caret.Y] |
1213 | cld |
1211 | cld |
1214 | jmp key.del.line_up |
1212 | jmp key.del.line_up |
1215 | endf |
1213 | endp |
Line 1216... | Line 1214... | ||
1216 | 1214 | ||
1217 | ;----------------------------------------------------------------------------- |
1215 | ;----------------------------------------------------------------------------- |
1218 | func key.tab ;///// TABULATE ///////////////////////////////////////////////// |
1216 | proc key.tab ;///// TABULATE ///////////////////////////////////////////////// |
1219 | ;----------------------------------------------------------------------------- |
1217 | ;----------------------------------------------------------------------------- |
1220 | call delete_selection |
1218 | call delete_selection |
Line 1221... | Line 1219... | ||
1221 | mov eax,[cur_editor.Caret.X] |
1219 | mov eax,[cur_editor.Caret.X] |
Line 1295... | Line 1293... | ||
1295 | m2m [cur_editor.SelStart.Y],[cur_editor.Caret.Y] |
1293 | m2m [cur_editor.SelStart.Y],[cur_editor.Caret.Y] |
1296 | mov [cur_editor.Modified],1 |
1294 | mov [cur_editor.Modified],1 |
Line 1297... | Line 1295... | ||
1297 | 1295 | ||
1298 | .exit: |
1296 | .exit: |
1299 | ret |
1297 | ret |
Line 1300... | Line 1298... | ||
1300 | endf |
1298 | endp |
1301 | 1299 | ||
1302 | ;----------------------------------------------------------------------------- |
1300 | ;----------------------------------------------------------------------------- |
1303 | func key.return ;///// CARRIAGE RETURN /////////////////////////////////////// |
1301 | proc key.return ;///// CARRIAGE RETURN /////////////////////////////////////// |
Line 1304... | Line 1302... | ||
1304 | ;----------------------------------------------------------------------------- |
1302 | ;----------------------------------------------------------------------------- |
1305 | call delete_selection |
1303 | call delete_selection |
Line 1430... | Line 1428... | ||
1430 | 1428 | ||
Line 1431... | Line 1429... | ||
1431 | mov [cur_editor.Modified],1 |
1429 | mov [cur_editor.Modified],1 |
1432 | 1430 | ||
1433 | .exit: |
1431 | .exit: |
Line 1434... | Line 1432... | ||
1434 | ret |
1432 | ret |
1435 | endf |
1433 | endp |
1436 | 1434 | ||
1437 | ;----------------------------------------------------------------------------- |
1435 | ;----------------------------------------------------------------------------- |
1438 | func key.ctrl_tab ;///// SWITCH TO NEXT TAB ////////////////////////////////// |
1436 | proc key.ctrl_tab ;///// SWITCH TO NEXT TAB ////////////////////////////////// |
1439 | ;----------------------------------------------------------------------------- |
1437 | ;----------------------------------------------------------------------------- |
1440 | cmp [tab_bar.Items.Count],1 |
1438 | cmp [tab_bar.Items.Count],1 |
Line 1457... | Line 1455... | ||
1457 | call draw_editor |
1455 | call draw_editor |
1458 | call draw_tabctl |
1456 | call draw_tabctl |
1459 | call update_caption |
1457 | call update_caption |
1460 | .exit: |
1458 | .exit: |
1461 | ret |
1459 | ret |
1462 | endf |
1460 | endp |
Line 1463... | Line 1461... | ||
1463 | 1461 | ||
1464 | ;----------------------------------------------------------------------------- |
1462 | ;----------------------------------------------------------------------------- |
1465 | func key.shift_ctrl_tab ;///// SWITCH TO PREVIOUS TAB //////////////////////// |
1463 | proc key.shift_ctrl_tab ;///// SWITCH TO PREVIOUS TAB //////////////////////// |
1466 | ;----------------------------------------------------------------------------- |
1464 | ;----------------------------------------------------------------------------- |
1467 | cmp [tab_bar.Items.Count],1 |
1465 | cmp [tab_bar.Items.Count],1 |
1468 | je .exit |
1466 | je .exit |
1469 | xor eax,eax |
1467 | xor eax,eax |
Line 1485... | Line 1483... | ||
1485 | call draw_editor |
1483 | call draw_editor |
1486 | call draw_tabctl |
1484 | call draw_tabctl |
1487 | call update_caption |
1485 | call update_caption |
1488 | .exit: |
1486 | .exit: |
1489 | ret |
1487 | ret |
1490 | endf |
1488 | endp |
Line 1491... | Line 1489... | ||
1491 | 1489 | ||
1492 | ;----------------------------------------------------------------------------- |
1490 | ;----------------------------------------------------------------------------- |
1493 | func key.ctrl_f4 ;///// CLOSE CURRENT TAB //////////////////////////////////// |
1491 | proc key.ctrl_f4 ;///// CLOSE CURRENT TAB //////////////////////////////////// |
1494 | ;----------------------------------------------------------------------------- |
1492 | ;----------------------------------------------------------------------------- |
1495 | cmp [cur_editor.Modified], 0 |
1493 | cmp [cur_editor.Modified], 0 |
1496 | je .close |
1494 | je .close |
1497 | mov [bot_dlg_mode2], 2 |
1495 | mov [bot_dlg_mode2], 2 |
Line 1509... | Line 1507... | ||
1509 | call align_editor_in_tab |
1507 | call align_editor_in_tab |
1510 | call draw_editor |
1508 | call draw_editor |
1511 | call draw_tabctl |
1509 | call draw_tabctl |
1512 | call draw_statusbar |
1510 | call draw_statusbar |
1513 | ret |
1511 | ret |
1514 | endf |
1512 | endp |
Line 1515... | Line 1513... | ||
1515 | 1513 | ||
1516 | ;----------------------------------------------------------------------------- |
1514 | ;----------------------------------------------------------------------------- |
1517 | func key.shift_f9 ;///// SET DEFAULT TAB ///////////////////////////////////// |
1515 | proc key.shift_f9 ;///// SET DEFAULT TAB ///////////////////////////////////// |
1518 | ;----------------------------------------------------------------------------- |
1516 | ;----------------------------------------------------------------------------- |
1519 | mov eax,[tab_bar.Current.Ptr] |
1517 | mov eax,[tab_bar.Current.Ptr] |
1520 | cmp eax,[tab_bar.Default.Ptr] |
1518 | cmp eax,[tab_bar.Default.Ptr] |
1521 | jne @f |
1519 | jne @f |
Line 1527... | Line 1525... | ||
1527 | jbe @f |
1525 | jbe @f |
1528 | call align_editor_in_tab |
1526 | call align_editor_in_tab |
1529 | call draw_editor |
1527 | call draw_editor |
1530 | @@: call draw_tabctl |
1528 | @@: call draw_tabctl |
1531 | ret |
1529 | ret |
1532 | endf |
1530 | endp |
Line 1533... | Line 1531... | ||
1533 | 1531 | ||
1534 | ;----------------------------------------------------------------------------- |
1532 | ;----------------------------------------------------------------------------- |
1535 | func key.f3 ;///// FIND NEXT MATCH /////////////////////////////////////////// |
1533 | proc key.f3 ;///// FIND NEXT MATCH /////////////////////////////////////////// |
1536 | ;----------------------------------------------------------------------------- |
1534 | ;----------------------------------------------------------------------------- |
1537 | call search |
1535 | call search |
1538 | jc @f |
1536 | jc @f |
1539 | @@: ret |
1537 | @@: ret |
Line 1540... | Line 1538... | ||
1540 | endf |
1538 | endp |
1541 | 1539 | ||
1542 | ;----------------------------------------------------------------------------- |
1540 | ;----------------------------------------------------------------------------- |
1543 | func key.f9 ;///// COMPILE AND RUN /////////////////////////////////////////// |
1541 | proc key.f9 ;///// COMPILE AND RUN /////////////////////////////////////////// |
1544 | ;----------------------------------------------------------------------------- |
1542 | ;----------------------------------------------------------------------------- |
1545 | mov bl,1 |
1543 | mov bl,1 |
1546 | call start_fasm |
1544 | call start_fasm |
Line 1547... | Line 1545... | ||
1547 | ret |
1545 | ret |
1548 | endf |
1546 | endp |
1549 | 1547 | ||
1550 | ;----------------------------------------------------------------------------- |
1548 | ;----------------------------------------------------------------------------- |
1551 | func key.ctrl_f9 ;///// COMPILE ////////////////////////////////////////////// |
1549 | proc key.ctrl_f9 ;///// COMPILE ////////////////////////////////////////////// |
1552 | ;----------------------------------------------------------------------------- |
1550 | ;----------------------------------------------------------------------------- |
1553 | mov bl,0 |
1551 | mov bl,0 |
Line 1554... | Line 1552... | ||
1554 | call start_fasm |
1552 | call start_fasm |
1555 | ret |
1553 | ret |
1556 | endf |
1554 | endp |
1557 | 1555 | ||
1558 | ;----------------------------------------------------------------------------- |
1556 | ;----------------------------------------------------------------------------- |
1559 | func key.alt_x ;///// EXIT PROGRAM /////////////////////////////////////////// |
1557 | proc key.alt_x ;///// EXIT PROGRAM /////////////////////////////////////////// |
1560 | ;----------------------------------------------------------------------------- |
1558 | ;----------------------------------------------------------------------------- |
Line 1581... | Line 1579... | ||
1581 | .close: |
1579 | .close: |
1582 | cmp [tab_bar.Items.Count],1 |
1580 | cmp [tab_bar.Items.Count],1 |
1583 | jne .bgn_rp |
1581 | jne .bgn_rp |
1584 | mov [main_closed],1 |
1582 | mov [main_closed],1 |
1585 | mcall -1 |
1583 | mcall -1 |
1586 | endf |
1584 | endp |