Changeset 2955 for trunk/src/netlabs/macros/wrap.e
- Timestamp:
- Mar 4, 2018, 7:24:01 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/netlabs/macros/wrap.e ¶
r2869 r2955 629 629 630 630 ; --------------------------------------------------------------------------- 631 ; Hard wrap: split lines. Try to split at words first. 631 ; Hard wrap: split lines. Try to split at words first. Processes only marked 632 ; lines, if current file is marked. 632 633 ; 633 634 ; Syntax: Wrap SplitCol [Style] … … 691 692 mouse_setpointer WAIT_POINTER 692 693 display -1 -- disable update of text area 693 call psave_pos(saved_pos) 694 call psave_pos( saved_pos) 695 696 fProcessMark = FileIsMarked() 697 if fProcessMark then 698 getmark firstl, lastl, firstc, lastc, markfid 699 MarkToLineMark() 700 else 701 firstl = 1 702 lastl = .last 703 endif 694 704 695 705 .line = 1 696 706 .col = 1 697 707 m = 0 698 l = 1 699 getfileid fid 700 client = gethwndc(EPMINFO_EDITCLIENT) 701 do while l <= .last 702 -- process all lines 708 l = firstl 709 do forever -- do forever is faster then using a condition 710 -- Check if line counter is > last (marked) line 711 if l > lastl then 712 leave 713 endif 714 if l > .last then 715 leave 716 endif 717 718 -- process lines 703 719 getline line, l 704 720 … … 739 755 endif 740 756 757 lastl = lastl + 1 758 759 if fProcessMark then 760 if l = lastl - 1 then 761 -- Extend mark to include wrapped line 762 setmark firstl, lastl, firstc, lastc, 0, markfid 763 endif 764 endif 765 741 766 m = m + 1 742 767 endif -- length( strip( line, 'T')) > SplitCol 768 743 769 l = l + 1 744 enddo -- while l <= .last745 746 call prestore_pos( saved_pos)770 enddo -- forever 771 772 call prestore_pos( saved_pos) 747 773 display 1 748 774 mouse_setpointer vEPM_POINTER 749 775 750 Msg = 'Wrap a fter 'SplitCol' chars: 'm776 Msg = 'Wrap at column 'SplitCol': 'm 751 777 if m = 1 then 752 778 Msg = Msg' change.'
Note:
See TracChangeset
for help on using the changeset viewer.