Public bug reported: In gedit's Perl highlight mode, variables of all kinds ($var, %hash, @array etc.) are highlighted in dark green. The same usually works for the last index of an array as well ($#array) but only if the array is one-dimensional. With multidimensional arrays, the proper syntax is more complicated: $#{$array[0]} should give the last index of the first element of an array of arrays. Here gedit however interprets the number sign (#) as the mark of a comment and highlights the rest of the line in blue. The expected behavior would be to highlight $#{$array[0]} in dark green like all other variables. See the attached screenshot.
Description: Ubuntu 18.04.1 LTS Release: 18.04 gedit: Installed: 3.28.1-1ubuntu1 Candidate: 3.28.1-1ubuntu1 Version table: *** 3.28.1-1ubuntu1 500 500 http://mr.archive.ubuntu.com/ubuntu bionic/main amd64 Packages 100 /var/lib/dpkg/status ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: gedit 3.28.1-1ubuntu1 ProcVersionSignature: Ubuntu 4.15.0-38.41-generic 4.15.18 Uname: Linux 4.15.0-38-generic x86_64 ApportVersion: 2.20.9-0ubuntu7.4 Architecture: amd64 CurrentDesktop: ubuntu:GNOME Date: Tue Oct 30 12:27:38 2018 InstallationDate: Installed on 2017-02-13 (624 days ago) InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2) ProcEnviron: TERM=xterm-256color PATH=(custom, no user) XDG_RUNTIME_DIR=<set> LANG=fi_FI.UTF-8 SHELL=/bin/bash SourcePackage: gedit UpgradeStatus: Upgraded to bionic on 2018-05-31 (151 days ago) ** Affects: gedit (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug bionic ** Attachment added: "Screenshot gedit perl multi-array index.png" https://bugs.launchpad.net/bugs/1800650/+attachment/5207156/+files/Screenshot%20gedit%20perl%20multi-array%20index.png -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gedit in Ubuntu. https://bugs.launchpad.net/bugs/1800650 Title: gedit highlights indexes of multidimensional arrays as comments in Perl mode To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/1800650/+subscriptions -- desktop-bugs mailing list desktop-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/desktop-bugs