diff ggrtf.tf @ 1669:97df3a9b3d45

Integrate the TF5 module into main and remove the module.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 12 Feb 2024 11:54:44 +0200
parents a17c3bdff36e
children b0c58647c169
line wrap: on
line diff
--- a/ggrtf.tf	Mon Feb 12 11:53:34 2024 +0200
+++ b/ggrtf.tf	Mon Feb 12 11:54:44 2024 +0200
@@ -1179,11 +1179,7 @@
 	/else \
 		/set status_cast=%;\
 	/endif%;\
-	/if (gtf_version < 50008)\
-		/eval /prompt $[strip_attr(set_gprompt)]%;\
-	/else \
-		/eval /prompt -p %{set_gprompt}%;\
-	/endif%;\
+	/eval /prompt $[strip_attr(set_gprompt)]%;\
 	/gstatus_update
 
 
@@ -2800,6 +2796,23 @@
 /prdefgbind -s"balance" -c"/balance"
 /prdefgbind -s"cbalance" -c"/chkbalance"
 
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; TF5 extended statusline handling
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+/def -i gstatus_init =\
+	/prdefvar -n"status_height" -v"2" -c"The number of rows in the status area in TF visual mode (GgrTF::TF5 uses 2)"%;\
+	/prdefvar -n"status_start" -v"0" -c"Start row used by GgrTF in TF visual mode (GgrTF::TF5 uses 0 by default)"%;\
+	/if (status_height < 2) /set status_height=2%;/endif%;\
+	/status_add -s0 -r$[status_start+1] -c "["%;\
+	/status_add -s0 -r$[status_start+1] status_protstr2::Cgreen%;\
+	/status_add -s0 -r$[status_start+1] "]"
+
+/def -i gstatus_update =\
+	/gstatus_update_do%;\
+	/eval /status_add -c -s0 -r%{status_start} %{status_pstr}
+
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Global script initialization
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -2807,4 +2820,6 @@
 	/greset%;\
 	/ginitialize%;\
 	/set set_wasinit=1%;\
+	/gstatus_init%;\
+	/gstatus_update%;\
 /endif