evilbinary / jota-text-editor

Automatically exported from code.google.com/p/jota-text-editor
0 stars 0 forks source link

Over-writing files with other content #19

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Jota is over writing currently open files with content sent from outside apps. 
Especially problematic when Auto Save is on.

What steps will reproduce the problem?
1. Open a file with Jota.
2. Use another program (like sl4a) to send text to Jota.
3. Save the file, or just exit Jota with Auto Save enabled.
4. Original file is erased and over written.

What is the expected output? What do you see instead?
I would expect Jota to save my previous file (or display it and ask to save 
it), and open the new text under a new Untitled filename.

What version of the product are you using? On what operating system?
Jota 0.2.16 (66)
Android 2.1

Please provide any additional information below.
This is made even worse with the menu option here:
Preferences> Theme Settings> Preview

Which will not only over write a file, but if you aren't currently using a 
file, it prompts for one from your history to be over written!

I love working with Jota, but I have come to be VERY cautious (and a bit 
fearful) about how I use it because of this problem.

Original issue reported on code.google.com by empty...@gmail.com on 11 May 2012 at 5:34

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for your report.
I reproduced the issue and indeed it's a BUG.

I'll check it and will fix.

Thanks,
Jiro

Original comment by jiro.a...@gmail.com on 12 May 2012 at 12:29

GoogleCodeExporter commented 9 years ago

Original comment by jiro.a...@gmail.com on 12 May 2012 at 12:30

GoogleCodeExporter commented 9 years ago
I fixed it. Please try this.

http://code.google.com/p/jota-text-editor/downloads/detail?name=jota-text-editor
0216test2.apk&can=2&q=#makechanges

Original comment by jiro.a...@gmail.com on 13 May 2012 at 4:10

GoogleCodeExporter commented 9 years ago
I have a bit of critique here, but let me start by thanking you very much for 
being so prompt and generally awesome about this problem.

So ok, I tested it and the new behavior appears to operate like this pseudo 
code:
if (incoming_text and jota_is_running and current_text_unsaved) then
  save(current_text)
  open(incoming_text)

Definitely a MUCH more desirable outcome! Though in a future implementation, it 
may be better to ask the user if the current_text should be saved or not (if 
it's possible?)

Also, this related problem seems to persist using?:
Preferences> Theme Settings> Preview

Why is it prompting for a text file from my history to overwrite?
I suppose that technically the main issue has been fixed, and this would 
qualify as a second bug/problem.

Hopefully this has been helpful feedback for you.

Original comment by empty...@gmail.com on 13 May 2012 at 6:41

GoogleCodeExporter commented 9 years ago
Preferences> Theme Settings> Preview

This screen is for previewing the theme image.
Not for use as editor.

Original comment by jiro.a...@gmail.com on 13 May 2012 at 10:45

GoogleCodeExporter commented 9 years ago
I double checked it again to be sure, and I see what you mean. I still managed 
to figure out how accidentally over-write a file, but it is much more difficult 
now. Here are the steps to reproduce.

1. Make sure auto save is on in Jota.
2. Open Jota (with or without a file).
3. Go to: Preferences> Theme Settings> Preview
4. Choose a file.
5. Jota now displays the text "size of wallpaper = 0 (width) x 0 (height)"
6. Press the home key.

The file will be over-written with the text "size of wallpaper = 0 (width) x 0 
(height)".

Original comment by empty...@gmail.com on 13 May 2012 at 12:00

GoogleCodeExporter commented 9 years ago
I'll remove 'Preview' feature at next version.

Thanks,
Jiro

Original comment by jiro.a...@gmail.com on 13 May 2012 at 1:52

GoogleCodeExporter commented 9 years ago
I'm glad I don't have to be afraid of Jota anymore. With the syntax 
highlighting it has become my primary editor.  :)

Original comment by empty...@gmail.com on 13 May 2012 at 11:11