summaryrefslogtreecommitdiffstats
path: root/Panel.c
AgeCommit message (Collapse)Author
2021-07-15Whitespace around operatorsBenny Baumann
2021-03-17RichString: do not unnecessarily clean whole bufferChristian Göttsche
The local stack buffer does not need to be cleaned to zeros when - just initialized, cause the length is set to 0 and the first character is set to '\0', so all printing functions will safely stop - no further used, i.e. the variable goes out of scope
2021-01-31Improve handling when selected last process entryChristian Göttsche
If the last process entry is selected and the process dies, stay at the end of the list and do not jump to the start. Also if the last entry is selected keep, after rebuilding the process list due to a new scan, the last entry selected.
2021-01-11Mark several non-modified pointer variables constChristian Göttsche
2021-01-04Panel_new: reorder argumentsChristian Göttsche
Reorder owner and type so they match the order of Panel_init
2021-01-04Add option to hide the Function BarChristian Göttsche
Support three settings: - Always show Function Bar - Always hide the Function Bar, except in Infoscreens (Env/Locks...) and when editing the search and filter mode - Hide the Function Bar on ESC until the next user input Closes: #439
2021-01-04Panel: rework hight logicChristian Göttsche
The hight of a Panel dpends on whether the Panel has a header or not. Also the header migth not be set on Panel creation, like in the MainPanel. This currently causes the cursor to get hidden behind the FunctionBar on down-scrolling.
2020-12-23Restore highlighted header of current sorted process columnChristian Göttsche
2020-12-22Merge branch 'misc' of https://github.com/cgzones/htop into cgzones-miscChristian Göttsche
2020-12-21Panel_init: initialize selectedLen memberChristian Göttsche
2020-12-20Rework drawing of FunctionBarChristian Göttsche
Draw the FunctionBar within Panel_draw instead of manually throughout the code. Add an optional PanelClass function drawFunctionBar, to allow specific panels to override the default FunctionBar_draw call. Rework the code on color change, to really change all colors (selection markers and panel headers). Closes: #402
2020-12-08Split RichString_(append|appendn|write) into wide and asciiChristian Göttsche
RichString_writeFrom takes a top spot during performance analysis due to the calls to mbstowcs() and iswprint(). Most of the time we know in advance that we are only going to print regular ASCII characters.
2020-12-03Allow to pass '/' for item searchBenny Baumann
2020-12-03Handle 'q' as quit if first characterBenny Baumann
2020-12-03Some visual code cleanupBenny Baumann
2020-12-03Use common handling for scrollingBenny Baumann
2020-12-03Reduce code duplicationBenny Baumann
2020-11-28Hide process selection on ESCChristian Göttsche
Do not highlight the current process line after pressing ESC in the main screen. Restore after pressing any key.
2020-11-16Merge branch 'hili-new-old' of adsr/htop into highlight-new-old-processesDaniel Lange
2020-11-02Embracing branchesBenny Baumann
2020-11-02Spacing around operatorsBenny Baumann
2020-11-02Whitespace and indentation issuesBenny Baumann
2020-11-02Spacing after keywords (for)Benny Baumann
2020-11-02Assert Vector_get returns an objectChristian Göttsche
It is generally assumed Vector_get returns a non-NULL object. Use a generic assert in Vector_get instead of in callers.
2020-10-30Highlight new and old processes (#74)Adam Saponara
2020-10-27Avoid some unnecessary casts and mark some not changing variables constChristian Göttsche
2020-10-18Make all required includes explicitBenny Baumann
Information as seen by IWYU 0.12 + clang 9 on Linux
2020-10-16Rename StringUtils.[ch] to XUtils.[ch]Benny Baumann
2020-10-07Mark Object instances constChristian Göttsche
2020-10-07Mark Object classes and Object class fields constChristian Göttsche
2020-10-05Update License consistently to GPLv2 as per COPYING fileDaniel Lange
2020-09-17Call character checking function with unsigned charChristian Göttsche
See https://wiki.sei.cmu.edu/confluence/display/c/STR37-C.+Arguments+to+character-handling+functions+must+be+representable+as+an+unsigned+char
2020-09-12Clean up some code duplication in the header filesHugo Musso Gualandi
PR htop-dev/htop#70 got rid of the infrastructure for generating header files, but it left behind some code duplication. Some of cases are things that belong in the header file and don't need to be repeated in the C file. Other cases are things that belong in the C file and don't need to be in the header file. In this commit I tried to fix all of these that I could find. When given a choice I preferred keeping things out of the header file, unless they were being used by someone else.
2020-09-09Consolidate repeated macro definitions into one headerNathan Scott
The MIN, MAX, CLAMP, MINIMUM, and MAXIMUM macros appear throughout the codebase with many re-definitions. Make a single copy of each in a common header file, and use the BSD variants of MINIMUM/MAXIMUM due to conflicts in the system <sys/param.h> headers.
2020-09-08Further, minor cleanups to headers post-MakeHeadersNathan Scott
Remove leftover empty ifdef/endif pairs, whitespace. The generated htop.h file was also unused - removed.
2020-09-03Axe automated header generation.Zev Weiss
Reasoning: - implementation was unsound -- broke down when I added a fairly basic macro definition expanding to a struct initializer in a *.c file. - made it way too easy (e.g. via otherwise totally innocuous git commands) to end up with timestamps such that it always ran MakeHeader.py but never used its output, leading to overbuild noise when running what should be a null 'make'. - but mostly: it's just an awkward way of dealing with C code.
2020-08-26Merge branch 'ci-hwloc-job' of https://github.com/bertwesarg/htop into ↵Nathan Scott
bertwesarg-ci-hwloc-job
2019-10-31Clean up existing whitespaceDaniel Flanagan
2018-02-05Handle unexpected values for character passed to isalnumHisham Muhammad
It seems that certain negative integer values can crash isalnum(). Let's protect against those. Fixes #711.
2016-08-07Fix scrolling behavior change caused by 759caf0fExplorer09
Commit "Make PgDown behavior more usual." 759caf0f8fa593430adea676fc64612b5197dca8 silently changes the PageDown scrolling behavior that, instead of scrolling one window down until the end of the window touches the end of the list, the window simply repositions itself in a way that the selected item always become the last item in the new window. The commit reverts the behavior, and also fixes sanity conditionals so that the scrollV variable will _never_ become negative or out-of- bound. Fixes issue #532. Also keep the problem #480 addressed. Signed-off-by: Kang-Che Sung <explorer09 @ gmail.com>
2016-06-19Moving left and right needs a full redraw.Hisham
2016-06-15Added Ctrl+A and Ctrl+E to go to beginning and end of line.Hisham
(Also, '^' and '$') Closes #508.
2016-05-04Make PgDown behavior more usual.Hisham
Closes #480.
2016-02-18Fix behavior of Panel on empty lists.Hisham
Closes #370.
2016-02-02Check for failure in allocations.Hisham
2015-11-02Fix moving of metersHisham Muhammad
2015-09-07fix calloc() callsChristian Hesse
* size_t nmemb (number of elements) first, then size_t size * do not assume char is size 1 but use sizeof() * allocate for char, not pointer to char (found by Michael McConville, fixes #261)
2015-08-27Don't select last item when clicking past the end of the panel.Hisham Muhammad
2015-08-19Support for NCurses 6.0 and mouse wheelHisham Muhammad
2015-08-19Rename String to StringUtils.David Hunt
Fixes building on case-insensitive filesystems where String.h gets confused with <string.h>. From d734dacea0a10d0465dad4e95b3421511e7da112 Mon Sep 17 00:00:00 2001 From: David Hunt <dhunt@iolanthe.attlocal.net> Date: Sat, 11 Jul 2015 20:56:31 -0500 Subject: [PATCH 1/8] Rename String to StringUtils