equal
deleted
inserted
replaced
769 begin |
769 begin |
770 if cursorPos > 0 then |
770 if cursorPos > 0 then |
771 begin |
771 begin |
772 HandleSelection(selMode); |
772 HandleSelection(selMode); |
773 cursorPos:= 0; |
773 cursorPos:= 0; |
774 UpdateCursorCoords(); |
774 end |
775 end; |
775 else if (not selMode) then |
|
776 ResetSelection(); |
|
777 |
|
778 UpdateCursorCoords(); |
776 end; |
779 end; |
777 SDLK_END: |
780 SDLK_END: |
778 begin |
781 begin |
779 i:= Length(InputStr.s); |
782 i:= Length(InputStr.s); |
780 if cursorPos < i then |
783 if cursorPos < i then |
781 begin |
784 begin |
782 HandleSelection(selMode); |
785 HandleSelection(selMode); |
783 cursorPos:= i; |
786 cursorPos:= i; |
784 UpdateCursorCoords(); |
787 end |
785 end; |
788 else if (not selMode) then |
|
789 ResetSelection(); |
|
790 |
|
791 UpdateCursorCoords(); |
786 end; |
792 end; |
787 SDLK_LEFT: |
793 SDLK_LEFT: |
788 begin |
794 begin |
789 if cursorPos > 0 then |
795 if cursorPos > 0 then |
790 begin |
796 begin |
805 end; |
811 end; |
806 |
812 |
807 if ctrl then |
813 if ctrl then |
808 SkipInputChars(skip, true); |
814 SkipInputChars(skip, true); |
809 |
815 |
810 UpdateCursorCoords(); |
816 end |
811 end; |
817 else if (not selMode) then |
|
818 ResetSelection(); |
|
819 |
|
820 UpdateCursorCoords(); |
812 end; |
821 end; |
813 SDLK_RIGHT: |
822 SDLK_RIGHT: |
814 begin |
823 begin |
815 if cursorPos < Length(InputStr.s) then |
824 if cursorPos < Length(InputStr.s) then |
816 begin |
825 begin |
827 end; |
836 end; |
828 |
837 |
829 if ctrl then |
838 if ctrl then |
830 SkipInputChars(GetInputCharSkipClass(cursorPos), false); |
839 SkipInputChars(GetInputCharSkipClass(cursorPos), false); |
831 |
840 |
832 UpdateCursorCoords(); |
841 end |
833 end; |
842 else if (not selMode) then |
|
843 ResetSelection(); |
|
844 |
|
845 UpdateCursorCoords(); |
834 end; |
846 end; |
835 SDLK_PAGEUP, SDLK_PAGEDOWN: |
847 SDLK_PAGEUP, SDLK_PAGEDOWN: |
836 begin |
848 begin |
837 // ignore me!!! |
849 // ignore me!!! |
838 end; |
850 end; |
840 begin |
852 begin |
841 // select all |
853 // select all |
842 if ctrl then |
854 if ctrl then |
843 begin |
855 begin |
844 ResetSelection(); |
856 ResetSelection(); |
|
857 cursorPos:= 0; |
|
858 HandleSelection(true); |
845 cursorPos:= Length(InputStr.s); |
859 cursorPos:= Length(InputStr.s); |
846 HandleSelection(true); |
|
847 cursorPos:= 0; |
|
848 UpdateCursorCoords(); |
860 UpdateCursorCoords(); |
849 end |
861 end |
850 else |
862 else |
851 action:= false; |
863 action:= false; |
852 end; |
864 end; |