.
.   
NEdit.org
   .

Home
 - News - Download - Documentation - Search - FTP     
.
.
  

Join lines

[Back]

 

This macro adds the text in the current line to the end of the previous one, which is useful if you want to overrun the wrap margin. It adds a space to the end of the previous line, and takes into account any indentation. It fails if the current line is the last one in the file, anyone wants to fix it? No.
set_cursor_pos(search("^", $cursor, "regex", "backward"))
s = $cursor
process_up()
set_cursor_pos(search("[^ \t]", $cursor, "regex"))
process_down()
select(s,$cursor)
indent = get_selection()
delete_selection()
insert_string(" ")
backward_character()
backward_character()
delete_next_character()
set_cursor_pos(search("^", $cursor, "regex"))
insert_string(indent"\n")
backward_character()
[Back]

. Released on  Wed, 21 Nov 2001  by C. Denat  

  
Visit our sponsor
Check Metrolink

© NEdit.org
1999-2001
All rights reserved


.