gedit highlights indexes of multidimensional arrays as comments in Perl mode

Bug #1800650 reported by Miikka-Markus Alhonen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gtksourceview4 (Ubuntu)
New
Undecided
Unassigned

Bug Description

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)

Revision history for this message
Miikka-Markus Alhonen (malhonen) wrote :
Wes (wesinator)
affects: gedit (Ubuntu) → gtksourceview (Ubuntu)
affects: gtksourceview (Ubuntu) → gtksourceview4 (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.