Skip to contentSkip to conversation

Fix vertical scrolling in powertop-2.10

PATCH In review Jaroslav Skarvada 2 participants 2 messages Mar 21, 2019 – Mar 28, 2019 1 message not in the archive

lore
Share & tools
lore

Jaroslav Skarvada

author
#1 lore raw

PATCH 1/1 Fix vertical scrolling in powertop-2.10

In reply to a message not in the archive

Hi,

it seems there is an regression in powertop-2.10 causing that the vertical scrolling is not working, e.g. you cannot scroll in the overview tab. The attached patch should fix it

thanks & regards

Jaroslav

src/display.cpp +1 -1
index 07227c5..7b3a7a2 100644
@@ -244,7 +244,7 @@ void cursor_down(void)
 	w = tab_windows[tab_names[current_tab]];
 	if (w) {
 		if (w->ypad_pos < 1000) {
-			if (tab_names[current_tab] == "Tunables" || "WakeUp") {
+			if (tab_names[current_tab] == "Tunables" || tab_names[current_tab] == "WakeUp") {
 		                if ((w->cursor_pos + 7) >= LINES) { 
 					prefresh(w->win, ++w->ypad_pos, w->xpad_pos, 
 						1, 0, LINES - 3, COLS - 1);
#2 lore raw

Hi Jaroslav,
Good catch! I tried the patch and the issue is fixed. Applied!

Thanks,
Gayatri

Quoted 16 lines

-----Original Message-----
From: PowerTop [mailto:powertop-bounces(a)lists.01.org] On Behalf Of Jaroslav Skarvada
Sent: Thursday, March 21, 2019 9:13 AM
To: powertop(a)lists.01.org
Subject: [Powertop] [PATCH] Fix vertical scrolling in powertop-2.10

Hi,

it seems there is an regression in powertop-2.10 causing that the vertical scrolling is not working, e.g. you cannot scroll in the overview tab. The attached patch should fix it

thanks & regards

Jaroslav