Check-in [931172bcb9]
Not logged in
Overview
Comment:Improvement in embedded editor when pressing <return> at end of file.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 931172bcb9de9c11abd2b0d8b43545496bab45a4
User & Date: peter 2019-02-17 18:18:19
Context
2019-03-16
14:12:05
[1df05cb056] Added CERT$ to obtain certificate information on domain name in SSL connection. (user: peter tags: trunk)
2019-02-17
18:18:19
[931172bcb9] Improvement in embedded editor when pressing <return> at end of file. (user: peter tags: trunk)
2019-02-15
18:19:20
[23086264e7] Improved generated makefile. (user: peter tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to bacon_trunk/bacon.bac.

6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006

7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
						GOTOXY 1, ypos
						line$ = TOKEN$(text$, start+ypos-1, NL$)
						Editor_Print_Line(MID$(line$, verticalpos), FALSE)
					ENDIF

					' Return key
				CASE 10
					IF ypos < ROWS THEN
						line$ = TOKEN$(text$, start+ypos-1, NL$)
						text$ = CHANGE$(text$, start+ypos-1, LEFT$(line$, verticalpos-1+xpos-1), NL$)
						text$ = APPEND$(text$, start+ypos, MID$(line$, verticalpos-1+xpos), NL$)

						Editor_Print_Text(text$, start)
						INCR ypos
						xpos = 1
						verticalpos = 1
					ENDIF

					' Other keys
				DEFAULT
					line$ = TOKEN$(text$, start+ypos-1, NL$)
					' Neutralize TAB key
					IF key = 9 THEN
						ch$ = SPC$(4)







<
|
|
|
>
|
|
|
|
<







6996
6997
6998
6999
7000
7001
7002

7003
7004
7005
7006
7007
7008
7009
7010

7011
7012
7013
7014
7015
7016
7017
						GOTOXY 1, ypos
						line$ = TOKEN$(text$, start+ypos-1, NL$)
						Editor_Print_Line(MID$(line$, verticalpos), FALSE)
					ENDIF

					' Return key
				CASE 10

					line$ = TOKEN$(text$, start+ypos-1, NL$)
					text$ = CHANGE$(text$, start+ypos-1, LEFT$(line$, verticalpos-1+xpos-1), NL$)
					text$ = APPEND$(text$, start+ypos, MID$(line$, verticalpos-1+xpos), NL$)
					IF ypos = ROWS THEN INCR start
					Editor_Print_Text(text$, start)
					IF ypos < ROWS THEN INCR ypos
					xpos = 1
					verticalpos = 1


					' Other keys
				DEFAULT
					line$ = TOKEN$(text$, start+ypos-1, NL$)
					' Neutralize TAB key
					IF key = 9 THEN
						ch$ = SPC$(4)
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
	"SORT\\$|SPC\\$|SQR|STR\\$|SUM|SUMF|TAB\\$|TAIL\\$|TALLY|TAN|TELL|TIMER|TIMEVALUE|TOKEN\\$|TYPEOF\\$|UCASE\\$|UCS|" \
	"ULEN|UNFLATTEN\\$|UNIQ\\$|UTF8\\$|VAL|WAIT|WEEK|WEEKDAY\\$|YEAR"
CONST Func_Col = 6

' Variables
CONST Var$ = "FALSE|TRUE|PI|MAXRANDOM|RETVAL|REGLEN|LINENO|NL\\$|CR\\$|EL\\$|CL\\$|VERSION\\$|ARGUMENT\\$|SOURCE\\$|NULL|" \
	"NUMBER|STRING|FLOATING|FILE|int|double|float|long|char|short|void|signed|unsigned|static|number|string|floating|volatile|" \
    "struct|extern|public|private|virtual"
CONST Var_Col = 3

' Numbers
CONST Num$ = "0|1|2|3|4|5|6|7|8|9"
CONST Num_Col = 1

' Comments







|







7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
	"SORT\\$|SPC\\$|SQR|STR\\$|SUM|SUMF|TAB\\$|TAIL\\$|TALLY|TAN|TELL|TIMER|TIMEVALUE|TOKEN\\$|TYPEOF\\$|UCASE\\$|UCS|" \
	"ULEN|UNFLATTEN\\$|UNIQ\\$|UTF8\\$|VAL|WAIT|WEEK|WEEKDAY\\$|YEAR"
CONST Func_Col = 6

' Variables
CONST Var$ = "FALSE|TRUE|PI|MAXRANDOM|RETVAL|REGLEN|LINENO|NL\\$|CR\\$|EL\\$|CL\\$|VERSION\\$|ARGUMENT\\$|SOURCE\\$|NULL|" \
	"NUMBER|STRING|FLOATING|FILE|int|double|float|long|char|short|void|signed|unsigned|static|number|string|floating|volatile|" \
	"struct|extern|public|private|virtual"
CONST Var_Col = 3

' Numbers
CONST Num$ = "0|1|2|3|4|5|6|7|8|9"
CONST Num_Col = 1

' Comments