Skip to content

Conversation

@melrovieira
Copy link

PR_HTOP.mp4

Copy link
Member

@BenBE BenBE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why limit this to one state artificially when you are storing a pointer to a string anyway?

The changes of this PR could have been one commit. Please rebase to squash them into one commit.

Also, please write all comments, including commit messages, in English.

Process.c Outdated
Comment on lines 864 to 868
char stateChar = processStateChar(this->state);
if (stateChar != stateFilter[0]) {
return true;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation

CommandLine.c Outdated
Comment on lines 396 to 398
if (flags.stateFilter) {
free_and_xStrdup(&settings->stateFilter, flags.stateFilter);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation

CommandLine.c Outdated
break;
case 'S':
assert(optarg);
if (optarg[0] == '\0' || optarg[1] != '\0' || !strchr("URQWDBPTtZXIS", optarg[0])) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list of valid state characters depends on the platform.

@BenBE BenBE added the feature request Completely new feature requested label Aug 13, 2025
Settings.h Outdated
bool topologyAffinity;
#endif

char* stateFilter;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the Settings structure is a wrong place for stateFilter. The Settings object is for things that would be saved and loaded in htoprc file, and the filters shouldn't carry across restarts of htop.

@BenBE
Copy link
Member

BenBE commented Aug 14, 2025

Somehow indentation in this PR has gotten even worse …

@Explorer09
Copy link
Contributor

I start to suspect @melrovieira is using an LLM to implement this feature, without full understanding how to code.

The commit description of f6d6037 is not helpful. It's useless to give a line-by-line description of changes, as the patch/diff itself can convey the same information.

@melrovieira
Copy link
Author

@Explorer09 Brother, I'm not using LLM, it's just that I've never documented any code, this is my first PR and I don't speak English. But forgive me if I made it seem that way. I tested everything and it's working. I documented poorly because I really don't know how to do it. I'm even using a translator right now.

@melrovieira
Copy link
Author

If you can help me, I appreciate it

@melrovieira
Copy link
Author

De alguma forma, o recuo neste PR ficou ainda pior…

Forgive me for this, I just used the resource that was in the code style guide.

@BenBE
Copy link
Member

BenBE commented Aug 14, 2025

Due to a mishap continued in #1757

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request Completely new feature requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants