summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2021-01-27HackStudio: Integate with C++ parser-based autocompleteItamar
By default, C++ auto completion will still be performed by the lexer-based logic. However, the parser-based logic can be switched on via the menubar.
2021-01-27HackStudio: Attach previous Language Client when detachingItamar
Previously, if a new LanguageClient was created & destroyed, the ServerConnection to the language server would be left without an attached LanguageClient. As a result, auto-completion results would not be updated in the UI. Starting with this commit, the LanguageClient holds a WeakPtr to the previous LanguageClient that was attached to the ServerConnection, and re-attaches it after detaching itself.
2021-01-27HackStudio: Add parser-based c++ autocomplete engineItamar
2021-01-27LibCpp: Add the beginning of a C++ parserItamar
This parser will be used by the C++ langauge server to provide better auto-complete (& maybe also other things in the future). It is designed to be error tolerant, and keeps track of the position spans of the AST nodes, which should be useful later for incremental parsing.
2021-01-27EditingEngine: Fix move_to_previous_word not working on last char of docZac
Code meant for the move_to_next_word functions which set the cursor to the last character in the file if it was reached was copied into the move_to_previous_word functions which lead them not moving when the function was called from the end of the file.
2021-01-27LibJS: Add overflow checks when creating TypedArray from ArrayBufferAndreas Kling
Thanks to Iliad for finding this! :^)
2021-01-27LibGfx: Correct the allocated buffer size in serialize_to_byte_buffer()AnotherTest
Fixes #5131.
2021-01-26Shell: Do not bail on signaled if conditionAnotherTest
Fixes #5119
2021-01-26LibGUI: Switch cancel/confirm button order on file picker dialogNico Weber
Most (all?) other dialogs in the system have the cancel button on the right, so make the file picker consistent with the rest.
2021-01-26LibGUI: Tweak "Overwrite file?" dialog text to use one sentence per sentenceNico Weber
2021-01-26lspci: Add numerical displayJean-Baptiste Boric
2021-01-25LibJS: Remove an unused TypedArray constructorAndreas Kling
2021-01-25crash: Add option for failing assertionLinus Groh
2021-01-25crash: Add option for pledge() violationLinus Groh
2021-01-25Vim: Add a simple yank and put implementationZac
2021-01-25TextEditor: Fix bug in delete_current_line() when deleting the last lineZac
A missing '- 1' when initializing the starting TextPosition lead to a crash due to attempting to delete text in an illegal TextRange.
2021-01-25WindowServer: Fix client unresponsiveness detectionLinus Groh
This broke in add01b3, where Core::Timer::create_single_shot() was changed to create a stopped timer. Fix it by actually starting the timer right away ourselves. Fixes #5111.
2021-01-25LibGfx: Implement scaling support for Painter::blit_filtered()Nico Weber
...and functions implemented in terms of it: blit_brightened(), blit_dimmed(), blit_disabled(). In theory, this should stop the window server from asserting when an application becomes unresponsive, but that feature seems to be broken for unrelated reasons atm (#5111).
2021-01-25AbstractTableView: prevent setting an invalid indexJelle Raaijmakers
If you tried to move a cursor down when the last row is selected, the index becomes invalid without updating the selection. On the next cursor movement the invalid index is then reset to {0, 0}, selecting the first row instead.
2021-01-25LibELF: Cache the DynamicObject in DynamicLoaderAndreas Kling
This avoids reparsing the same dynamic library file multiple times.
2021-01-25LibELF: Use Optional<SymbolLookupResult> as a return typeAndreas Kling
Instead of storing a "found" state inside the result object.
2021-01-25LibELF: Convert String::format() to String::formatted()Andreas Kling
2021-01-25DynamicLoader: Remove some unnecessary #includesAndreas Kling
2021-01-25LibELF: Convert dbgprintf() in DynamicObject class to dbgln()Andreas Kling
2021-01-25LibELF: Convert dbgprintf() in DynamicLinker class to dbgln()Andreas Kling
2021-01-25LibELF: Convert dbgprintf() in DynamicLoader class to dbgln()Andreas Kling
2021-01-25DynamicLoader: Remove unused debugging macrosAndreas Kling
2021-01-25LibGfx: Remove unreachable branch in Painter::draw_scaled_bitmapNico Weber
This is in the else block of a `(source.has_alpha_channel() || opacity != 1.0f)` conditional, so it's guaranteed that !source.has_alpha_channel() in here, which means source.format() can't be RGBA32. No behavior change.
2021-01-25LibGfx: Fix opacity handling in Painter::draw_scaled_bitmapNico Weber
If the source image had no alpha channel we'd ignore opacity < 1.0 and blit the image as if it was fully opaque. With this fix, adjusting the opacity of windows with mousewheel while holding super works in hidpi mode.
2021-01-25LibGfx: Minor style tweaks in PainterNico Weber
No behavior change.
2021-01-25Everywhere: Hook up remaining debug macros to Debug.h.asynts
2021-01-25Everywhere: Debug macros instead of constexpr.asynts
This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
2021-01-25Everywhere: Name debug macros more consistently.asynts
Personally, I prefer the naming convention DEBUG_FOO over FOO_DEBUG, but the majority of the debug macros are already named in the latter naming convention, so I just enforce consistency here. This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/DEBUG_PATH/PATH_DEBUG/' {} \;
2021-01-25Everywhere: Remove unnecessary debug comments.asynts
It would be tempting to uncomment these statements, but that won't work with the new changes. This was done with the following commands: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/#define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/#define/ { toggle = 1 }' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/ #define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/ #define/ { toggle = 1 }' {} \;
2021-01-25Everywhere: Use CMake to generate AK/Debug.h.asynts
This was done with the help of several scripts, I dump them here to easily find them later: awk '/#ifdef/ { print "#cmakedefine01 "$2 }' AK/Debug.h.in for debug_macro in $(awk '/#ifdef/ { print $2 }' AK/Debug.h.in) do find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/#ifdef '$debug_macro'/#if '$debug_macro'/' {} \; done # Remember to remove WRAPPER_GERNERATOR_DEBUG from the list. awk '/#cmake/ { print "set("$2" ON)" }' AK/Debug.h.in
2021-01-25LibGfx:: Implement scale support for blit_with_opacity()Nico Weber
Now we no longer crash on mousewheel over Terminal while holding the super key. The terminal window doesn't yet correctly become transparent in hidpi mode (needs more investigation), but it works in LibGfxScaleDemo, so maybe that's a problem elsewhere. Also add a FIXME for a pre-existing bug.
2021-01-25Userland: Implement grep -v (invert-match)Andrew Kaster
This will make grep output every line that doesn't have any matches of the given regular expression
2021-01-25Userland: Use getline instead of Core::File::standard_input in grepAndrew Kaster
Core::IODevice (which Core::File inherits from) does not have a reasonable way to block for a line. grep was spinning on IODevice::read_line, passing endless empty strings to the matcher lambda. Use getline instead, which will at least block in the Kernel for characters to be available on stdin and only return full lines (or eof)
2021-01-24LibJS: Set length of TypedArray constructors to 3Linus Groh
https://tc39.es/ecma262/#sec-typedarray-constructors Each TypedArray constructor [...] has a "length" property whose value is 3.
2021-01-24SystemServer: Do not crash if device files are not presentJean-Baptiste Boric
2021-01-24WindowServer: Don't crash if unable to open input peripheralsJean-Baptiste Boric
Seems a bit extreme, other operating systems don't have their graphical environment crash if there is no keyboard or no mouse.
2021-01-24FontEditor: change order of baseline and mean line rowNico Weber
The mean line is above the baseline, so it makes sense if the UI elements are in the same order.
2021-01-24FontEditor: change "Mean Line:" label to "Mean line:"Nico Weber
Matches the case used in other labels in the app.
2021-01-24FontEditor: Fix typos in codeNico Weber
No behavior change.
2021-01-24FontEditor: Make left and right UI margins matchNico Weber
2021-01-24FontEditor: Remove "Save" and "Quit" buttonsNico Weber
We have both the normal menu items and keyboard shortcuts for these by now. No need to have always-visible buttons -- makes the app more consistent with the other apps, and makes it use up less vertical space.
2021-01-24Vim: More correct word jumping (#5090)Zac
Implemented move_to_beginning_of_next(), move_to_end_of_next(), move_to_beginning_of_previous() and move_to_end_of_previous() functions for more correct word jumping than the move_to_xxx_span() methods that were previously used.
2021-01-24HexEditor: FindCamisul
Added search submenu with options to find or find again. Find allows to search for ASII string or sequence of Hex value.
2021-01-24FileManager: Make DirectoryView open links in their real directoryDragonAlex98
Previously it was possible to open a link like /home/anon/Desktop/Home, leading to a folder with the same name. Now it correctly opens its real path, which is /home/anon FileManager: Use Core::File::real_path_for to get real path of links
2021-01-24pmap: Sort memory regions in outputAndreas Kling
This makes the program 100% nicer to use. :^)