Scratch editor erases document content before it opens it
Bug #1179292 reported by
Humberto F. da Luz Jr.
This bug affects 6 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Scratch |
Fix Released
|
High
|
Mario Guerriero |
Bug Description
For some reason when I open .tex files scratch erases its content, saves it, then a blank document is open.
Files with other extensions were open correctly by my experiments.
Maybe this is a file encoding related issue. The encoding of the files that cause this issue:
file --mime acronimos.tex
acronimos.tex: text/plain; charset=iso-8859-1
The encoding of the files that were open correctly is us-ascii.
A sample file is attached.
Changed in scratch: | |
milestone: | none → 2.0 |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in scratch: | |
assignee: | nobody → Mario Guerriero (mefrio-g) |
status: | Confirmed → Fix Released |
To post a comment you must log in.
I can reproduce this. Terminal shows this:
[_LOG_LEVEL_INFO 21:43:35.683638] Application. vala:77: Scratch version: 2.0 vala:79: Kernel version: 3.2.0-41- generic- pae scratch. saved-state' scratch. settings' scratch. services' gabriel/ Descargas/ acronimos (copy).tex" to be "WINDOWS-1251" buffer_ emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed
[_LOG_LEVEL_INFO 21:43:35.683797] Application.
[_LOG_LEVEL_DEBUG 21:43:35.692536] Settings.vala:158: Loading settings from schema 'org.pantheon.
[_LOG_LEVEL_DEBUG 21:43:35.693344] Settings.vala:158: Loading settings from schema 'org.pantheon.
[_LOG_LEVEL_DEBUG 21:43:35.695103] Settings.vala:158: Loading settings from schema 'org.pantheon.
[_LOG_LEVEL_DEBUG 21:43:35.951774] [Gtk] Connecting to session manager
[_LOG_LEVEL_DEBUG 21:43:36.168232] SplitView.vala:141: WelcomeScreen shown succefully
[_LOG_LEVEL_DEBUG 21:43:36.176221] SplitView.vala:149: WelcomeScreen hidden succefully
[_LOG_LEVEL_DEBUG 21:43:36.178222] SplitView.vala:87: View added succefully
[_LOG_LEVEL_INFO 21:43:36.278366] Document.vala:92: Opening "acronimos (copy).tex"
[_LOG_LEVEL_DEBUG 21:43:36.613515] Encoding.vala:277: Detected encoding of file "/home/
[_LOG_LEVEL_FATAL 21:43:36.622470] [Gtk] gtk_text_
[_LOG_LEVEL_FATAL 21:43:36.622617] Scratch will not function properly.
[_LOG_LEVEL_INFO 21:43:36.904015] Document.vala:230: File "acronimos (copy).tex" saved succefully