Commit Graph

18049 Commits

Author SHA1 Message Date
lucastarche
115348147d TextEditorWidget: Whitespace related options 2021-03-25 11:01:49 +01:00
lucastarche
6d3d097832 TextEditor: Visualize leading whitespace 2021-03-25 11:01:49 +01:00
lucastarche
f6892d1ede TextEditorWidget: Added tab width submenu 2021-03-25 11:01:49 +01:00
lucastarche
0071dc7be4 TextEditor: Added a setter for soft_tab_width 2021-03-25 11:01:49 +01:00
Idan Horowitz
78f0cabb17 LibJS: Use Utf8View for string prefix checks
This commit replaces the usage of String::starts_with with
Utf8View::starts_with, which first decodes the utf8 encoded
string, and as such can take things like overlong encoded
sequences into account (which could otherwise cause the prefix
check to be inconsistent with the following code points check).
2021-03-25 10:59:34 +01:00
Idan Horowitz
edecf8f6a3 AK: Add starts_with to Utf8View
Unlike String/StringView::starts_with this compares utf8 code points
instead of "characters" (bytes), which is important when handling
aribtary utf-8 input that could include overlong characters.
2021-03-25 10:59:34 +01:00
David Isaksson
3f9ac88c6e PropertiesWindow: Show the file size in a human readable format 2021-03-25 10:59:11 +01:00
David Isaksson
17c0349d23 AK: Add longer human readable size to string helper function
Wraps the existing AK::human_readable_size function but will always
display the bytes in the base unit as well as the shorter string with
one decimal. E.g. "14 KiB (14396 bytes)".
2021-03-25 10:59:11 +01:00
AnicJov
d3630a7b1f Ports: Fix m4
This patch fixes the m4 port by removing unneeded make subdirs that
would cause the build to fail on some systems. We now only care about
the `lib` and `src`.
2021-03-25 10:58:45 +01:00
Linus Groh
d182f3224a checksum: Use new format functions 2021-03-25 10:58:26 +01:00
Tom
7626f9e0bb LibGUI: Process pending window updates after handling input events
Since input events may trigger window portions to be invalidated,
rather than making a round trip to WindowServer to get paint events
we can simply fake an immediate paint event and update the window
contents more quickly.

Improves #5881
2021-03-24 21:03:29 +01:00
Linus Groh
edb6ada3ef test-js+test-web: Replace JSTestRunnerCounts with Test::Counts 2021-03-24 20:38:20 +01:00
Linus Groh
bce1f956e7 LibTest: Add Test::Counts
This is the JSTestRunnerCounts struct from test-js and test-web (but
using unsigned integers - no negative counts). Not all test runners will
use all fields, but all will want to keep track of various counts.
2021-03-24 20:38:20 +01:00
Linus Groh
ad4cc19ca0 Meta: Pass arguments to 'serenity.sh run lagom' executable 2021-03-24 20:38:05 +01:00
David Isaksson
391d1ddfd8 Spreadsheet: Ensure that cell exists on drop event for text data
Fixes crash where we tried to get a cell to set text from the drop
event. We now create the cell if it does not already exists.

Fixes issue #5923
2021-03-24 20:36:41 +01:00
Cesar Torres
6179c9ad25 jp: add man page 2021-03-24 20:34:26 +01:00
Cesar Torres
6c2f690a74 jp: set input to stdin if there is no file specified and add
and customizable indentation level

An example: cat /proc/net/adapters | jp
Another example: cat /proc/all | jp -i 2  (indents are set to 2 spaces, instead of 4 by default)
2021-03-24 20:34:26 +01:00
networkException
4f22c92b99 Keymap: Added de-macintosh.json for German Mac keyboards
Some special characters might not match the exact layout
from macOS as this was tested on Linux, but it is close
enough to be well usable
2021-03-24 15:57:49 +01:00
Linus Groh
0fb980ed88 LibJS: Don't static_cast<double>() various Date getter values
Since we have Value::Type::Int32 now, let's use the Value(i32)
constructor here directly by not casting these i32 values to doubles.
The Value(double) would also figure out that these can be stored as
integers, but needs to do extra work which is not needed here. :^)
2021-03-23 20:57:31 +01:00
Andreas Kling
d20e3dbe8b LibGUI: Remove one ancient GMENU_DEBUG debug log 2021-03-23 20:37:39 +01:00
Idan Horowitz
0deb0c6891 UserspaceEmulator: Update virt$lseek and virt$ftruncate for 64bit off_t
The syscalls' prototypes were recently changed in preparation for 64bit
storage in serenity, so update them here as well :^)
2021-03-23 19:56:13 +01:00
Liav A
663dea4a60 Kernel: Return real handler purpose when registered to spurious handler
If we registered a real interrupt handler to a spurious one, we should
return its purpose instead of the spurious purpose string.
2021-03-23 19:27:00 +01:00
Liav A
fe761e7412 Kernel: Handle real IRQs from line 7 when using the PIC
If we have a real IRQ7 to handle, let's make sure the handler knows to
check if it really occured for this value and not only for IRQ15.
2021-03-23 19:27:00 +01:00
Liav A
b25f84daaa Revert "Kernel/AHCI: Add a boot argument to force AHCI to operate on IRQ 11"
This reverts commit cfc2f33dcb.

We can't actually change the IRQ line value and expect the device
to work with it (this was my mistake).
That register is R/W so the firmware can figure out IRQ routing and put
the correct value and write it to the Interrupt line register.
2021-03-23 19:27:00 +01:00
Itamar
84e34d76d8 HackStudio+LanguageServers/Cpp: Show scope of symbols in Locator 2021-03-23 18:32:39 +01:00
Itamar
6054a418e5 LanguageServers/Cpp: Declarations inside namespaces are globally visible
This includes declarations inside namespaces in the globally visible
declarations of a cpp document.
2021-03-23 18:32:39 +01:00
Itamar
b5cab861e3 LibCpp: Parse Namespace declaration
Also, remove unused State::Context
2021-03-23 18:32:39 +01:00
Idan Horowitz
505c84fdf0 Base: Add man page for zip(1) 2021-03-23 16:09:36 +01:00
Idan Horowitz
97216c935a Userland: Add simple zip utility
This uses the recently added ZipOutputStream in LibArchive.
2021-03-23 16:09:36 +01:00
Idan Horowitz
550ae23e80 LibArchive: Implement ZipOutputStream for zip archive creation
This output stream can be used to create zip archives, and will
be used in the implementation of the zip utility.
2021-03-23 16:09:36 +01:00
Idan Horowitz
8eceef0b1b unzip: Use the new LibArchive Zip parser
This parser should be a little bit more modern and a little more
resilient to zip files from other operating systems. As a side
effect we now also support extracting zip files that are using
DEFLATE compression (using our own LibCompress).
2021-03-23 16:09:36 +01:00
Idan Horowitz
caf4bde3a9 LibArchive: Add Zip file parser
This is based on the zip specification on PKWARE's zip specification
(https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT) and will
be used in the unzip utility and eventually in the zip utility.
2021-03-23 16:09:36 +01:00
Idan Horowitz
a809db90dd Libraries: Rename LibTar to LibArchive
This is in preparation for a new implementation of zip archive
extraction and creation.
2021-03-23 16:09:36 +01:00
Linus Groh
40eab55e7d LibJS: Remove as_size_t()
Just like to_size_t() - which was already removed in f369229 - this is
non-standard, use to_length() instead. One remaining use was removed,
and I'm glad it's gone. :^)
2021-03-23 08:22:39 +01:00
Oleg Sikorskiy
a1014d25de LibJS: Simplify positive/negative zero checks
Because both zeroes have unique and distinct bit representations,
we can bit_cast value to u64 and check if it's one of them.
2021-03-23 08:22:15 +01:00
Oleg Sikorskiy
e99dabc729 AK: Implement bit_cast 2021-03-23 08:22:15 +01:00
lucastarche
fa9dfa3da1 PixelPaint: Added Zoom tool 2021-03-23 08:21:08 +01:00
lucastarche
3947d301e5 PixelPaint: ImageEditor scaling method
Moved the code on mousewheel_event to its own function.
2021-03-23 08:21:08 +01:00
Petróczi Zoltán
ca49f96b78 LibJS Date: Added "Invalid Date".
Setting an invalid value on a Date object now makes it invalid.
Setting it again but with correct values makes it valid again.
2021-03-22 20:58:22 +01:00
Petróczi Zoltán
d231c5e65b LibJS Date: Added toUTCString()
toGMTString() is deprecated but is kept for compatibility's sake, but because
HTTP Dates are always expressed in GMT, it should be safe to call toUTCString()
in toGMTString().
2021-03-22 20:58:22 +01:00
Andreas Kling
036b5c2804 LibWeb: Import new CSS parser
It's not finished or hooked up to anything yet, but let's get it into
the tree so we can continue working on it.

Original work by @stelar7.
2021-03-22 18:40:08 +01:00
AnotherTest
ba2df70eab Spreadsheet: Do not assume that a worksheet always exists
Fixes #5910.
Fixes #4822 (as far as I can tell).
2021-03-22 17:46:17 +01:00
AnotherTest
534626f917 Spreadsheet: Save the cells under the correct name
This broke in 6a6f19a72f, which replaced
the representation of columns with numbers.
As a result, the save logic would store cells as
"\x<column_index><row_number>", which is obviously wrong.
Fixes #5905.
Also simplifies the control flow in `import_worksheet` a bit.
2021-03-22 17:46:17 +01:00
AnotherTest
7b4fa860d2 Spreadsheet: Check for parse errors after parsing the source
There won't be any parse errors before we actually try to parse
something.
Fixes input like "=1+" crashing the spreadsheet instead of just causing
an error in the cell.
2021-03-22 17:46:17 +01:00
AnotherTest
fef165f1d2 Spreadsheet: Do not assume that user input has balanced parenthesis
Otherwise people with broken paren keys, or people with entertaining
ideas like "=9\b)" will cause an assert to trip.
Fixes #5909.
2021-03-22 17:46:17 +01:00
Brendan Coles
677e5e4d84 readelf: Use Loader.so interpreter for dynamic section and symbols 2021-03-22 17:46:05 +01:00
Brendan Coles
8ad74684ea LibELF: DynamicObject: Add rpath and runpath helpers 2021-03-22 17:46:05 +01:00
AnotherTest
2efa17184d Shell: Add tests for slices 2021-03-22 13:15:08 +01:00
AnotherTest
4ff430b615 Base: Document Shell's variable indexing behaviour 2021-03-22 13:15:08 +01:00
AnotherTest
6c94207ee0 Base: Document Shell's immediate functions 2021-03-22 13:15:08 +01:00