Show indicator in status when window has pending input
This commit is contained in:
		
							parent
							
								
									012fd67539
								
							
						
					
					
						commit
						a281bdc5e1
					
				
							
								
								
									
										1
									
								
								chat.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								chat.h
									
									
									
									
									
								
							@ -331,6 +331,7 @@ int uiSave(void);
 | 
			
		||||
void inputInit(void);
 | 
			
		||||
void inputWait(void);
 | 
			
		||||
void inputUpdate(void);
 | 
			
		||||
bool inputPending(uint id);
 | 
			
		||||
void inputRead(void);
 | 
			
		||||
void inputCompleteAdd(void);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								input.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								input.c
									
									
									
									
									
								
							@ -227,6 +227,10 @@ void inputUpdate(void) {
 | 
			
		||||
	wmove(uiInput, y, pos);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool inputPending(uint id) {
 | 
			
		||||
	return edits[id].len;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static const struct {
 | 
			
		||||
	const wchar_t *name;
 | 
			
		||||
	const wchar_t *string;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										10
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								window.c
									
									
									
									
									
								
							@ -164,7 +164,7 @@ static void statusUpdate(void) {
 | 
			
		||||
	wmove(uiStatus, 0, 0);
 | 
			
		||||
	for (uint num = 0; num < count; ++num) {
 | 
			
		||||
		const struct Window *window = windows[num];
 | 
			
		||||
		if (num != show && !window->scroll) {
 | 
			
		||||
		if (num != show && !window->scroll && !inputPending(window->id)) {
 | 
			
		||||
			if (window->heat < Warm) continue;
 | 
			
		||||
			if (window->mute && window->heat < Hot) continue;
 | 
			
		||||
		}
 | 
			
		||||
@ -181,15 +181,17 @@ static void statusUpdate(void) {
 | 
			
		||||
		);
 | 
			
		||||
		if (window->mark && window->unreadWarm) {
 | 
			
		||||
			ptr = seprintf(
 | 
			
		||||
				ptr, end, "\3%d+%d\3%d%s",
 | 
			
		||||
				ptr, end, "\3%d+%d\3%d ",
 | 
			
		||||
				(window->heat > Warm ? White : idColors[window->id]),
 | 
			
		||||
				window->unreadWarm, idColors[window->id],
 | 
			
		||||
				(window->scroll ? "" : " ")
 | 
			
		||||
				window->unreadWarm, idColors[window->id]
 | 
			
		||||
			);
 | 
			
		||||
		}
 | 
			
		||||
		if (window->scroll) {
 | 
			
		||||
			ptr = seprintf(ptr, end, "~%d ", window->scroll);
 | 
			
		||||
		}
 | 
			
		||||
		if (num != show && inputPending(window->id)) {
 | 
			
		||||
			ptr = seprintf(ptr, end, "@ ");
 | 
			
		||||
		}
 | 
			
		||||
		if (styleAdd(uiStatus, StyleDefault, buf) < 0) break;
 | 
			
		||||
	}
 | 
			
		||||
	wclrtoeol(uiStatus);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user