Sebastian Keller 484a237002 keyboard: Fix deleting the previous word
Since mutter@33088d59 the cursor we receive from mutter already is a
character index while the code here still treated it like a byte offset.

Further the code to detect the previous word position was treating the
cursor parameter already like a character index, while passing the
cursor that was prior to that commit a byte offset.

The function also had some unreachable and redundant code paths. The
pos < 0 case can never be reached due to the max(). Also the regex
already ensures that all whitespace is considered, so the code to remove
spaces not actually do anything except when deleting the first word in
the text, in which it would cause the first character to not get
deleted.

Also it was not handling characters with more than 2 bytes correctly. In
the presence of these JS string functions, such as search(), can not be
considered to operate on character indices anymore but rather the number
of UTF-16 byte pairs. Issues with this can be avoided by using
iterators, which unlike anything else iterate on characters, not byte
pairs and by not using the results returned by JS string functions for
anything but JS strings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2746>
2024-02-29 14:56:16 +00:00
2024-01-27 22:23:10 +01:00
2023-08-09 15:10:38 +00:00
2020-12-28 02:25:17 +01:00
2024-02-26 19:58:23 +00:00
2024-01-25 16:53:36 +00:00
2023-08-06 13:02:49 +02:00
2023-08-09 15:10:38 +00:00
2024-02-25 22:06:46 +00:00
2023-04-21 18:28:32 +00:00
2014-01-08 04:35:14 +07:00
2024-02-11 17:54:00 +01:00

GNOME Shell

GNOME Shell provides core user interface functions for the GNOME desktop, like switching to windows and launching applications. GNOME Shell takes advantage of the capabilities of modern graphics hardware and introduces innovative user interface concepts to provide a visually attractive and easy to use experience.

All interactions with the project should follow the Code of Conduct.

Supported versions

Upstream gnome-shell only supports the most recent stable release series, the previous stable release series, and the current development release series. Any older stable release series are no longer supported, although they may still receive backported security updates in long-term support distributions. Such support is up to the distributions, though.

Please refer to the schedule to see when a new version will be released.

Reporting bugs

Bugs should be reported to the issue tracking system.

The GNOME handbook has useful information for creating effective issue reports.

If you are using extensions, please confirm that an issue still happens without extensions. To properly disable extensions you can use the extensions-app and then restart your session. Disabling extensions without a restart is not sufficient to rule out extensions as the cause of a bug. If an issue can only be reproduced with a certain extension, please file an issue report against that extension first.

Please note that the issue tracker is meant to be used for actionable issues only.

For support questions, feedback on changes or general discussions, you can use:

Feature requests

gnome-shell is a core compoment of the GNOME desktop experience. As such, any changes in behavior or appearance only happen in accordance with the GNOME design team.

For major changes, it is best to start a discussion on discourse and reach out on the #gnome-design matrix room, and only involve the issue tracker once agreement has been reached.

In particular mockups must be approved by the design team to be considered for implementation.

For enhancements that are limited in scope and well-defined, it is acceptable to directly open a feature request.

When in doubt, it is better to ask before opening an issue.

Contributing

To contribute, open merge requests at https://gitlab.gnome.org/GNOME/gnome-shell.

It can be useful to first look at the GNOME handbook.

If a change likely requires discussion beyond code review, it is probably better to open an issue first, or follow the process for feature requests. Otherwise, creating a separate issue is not required.

The following guidelines will help your change to be successfully merged:

  • Keep the change as small as possible. If you can split it into multiple merge requests, please do so.
  • Use multiple commits. This makes it easier to review and helps to diagnose bugs in the future.
  • Use clear commit messages following the conventions.
  • Pay attention to the CI results. Merge requests cannot be merged until the CI passes.

Documentation

API Reference

  • Meta: Display server and window manager
  • St: Shell toolkit
  • Clutter: OpenGL based scene graph
  • Shell: Non-ui shell objects and utilities
  • See the mutter page for additional documentation

License

GNOME Shell is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for details.

Description
Languages
C 49.2%
JavaScript 47.4%
SCSS 1.4%
Meson 0.8%
Python 0.6%
Other 0.4%