gedit + vala syntax highlighting problem
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gtksourceview (Ubuntu) |
Fix Released
|
Low
|
Ubuntu Desktop Bugs |
Bug Description
Binary package hint: gedit
When a .vala file starts with a comment, not all of the syntax will be colored correctly. For an example, use this code from http://
/* Basic Vala Sample Code */
using GLib;
public class Sample : Object {
public Sample () {
}
public void run () {
}
static int main (string[] args) {
var sample = new Sample ();
}
}
Save as sample.vala. To get proper highlighting, you will have to delete the comment and any newlines before the first line of code, and then save. If you insert the comment again and then save, the syntax will again lose highlighting. This holds true for /* multiline */ and // singleline comments.
Basically, as long as there is a comment before the first line of vala code, gedit will not highlight correctly.
ProblemType: Bug
Architecture: amd64
Date: Sat Feb 2 21:49:34 2008
DistroRelease: Ubuntu 7.10
ExecutablePath: /usr/bin/gedit
NonfreeKernelMo
Package: gedit 2.20.3-0ubuntu1
PackageArchitec
ProcCmdline: gedit
ProcCwd: /home/matt
ProcEnviron:
PATH=/
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: gedit
Uname: Linux pancho 2.6.22-14-rt #1 SMP PREEMPT RT Tue Dec 18 06:37:06 UTC 2007 x86_64 GNU/Linux
Some more testing shows that if the file begins with anything but "using ...", syntax highlighting will be disrupted. This includes spaces/newlines, and valid lines of code that do not contain the keyword "using".