~aleteoryx/sexchat

14a3ec2301dfb70d6a6b0ea75c4eebfe6582bb31 — Aleteoryx 4 months ago 3db1cd5
always log tabs to disk scrollback
1 files changed, 5 insertions(+), 18 deletions(-)

M src/common/text.c
M src/common/text.c => src/common/text.c +5 -18
@@ 1735,6 1735,10 @@ load_text_events ()
*/
#define ARG_FLAG(argn) (1 << (argn))


/* tab stripping is handled in fe_print_text, so I have omitted it here.
   this ensures scrollback will display correctly when prefs.hex_text_indent
   is toggled. */
void
format_event (session *sess, int index, char **args, char *o, gsize sizeofo, unsigned int stripcolor_args)
{


@@ 1796,12 1800,6 @@ format_event (session *sess, int index, char **args, char *o, gsize sizeofo, uns
			o[oi++] = 0;
			done_all = TRUE;
			continue;
		case 3:
			if (prefs.hex_text_indent)
				o[oi++] = '\t';
			else
				o[oi++] = ' ';
			break;
		}
	}
	o[oi] = 0;


@@ 1906,18 1904,7 @@ pevt_build_string (const char *input, char **output, int *max_arg)
		}
		if (d == 't')
		{
			/* Tab - if tabnicks is set then write '\t' else ' ' */
			s = g_new (struct pevt_stage1, 1);
			if (base == NULL)
				base = s;
			if (last != NULL)
				last->next = s;
			last = s;
			s->next = NULL;
			s->data = g_malloc (1);
			s->len = 1;
			clen += 1;
			s->data[0] = 3;
			o[oi++] = '\t'; // see format_event

			continue;
		}