Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor position adds empty rows or columns to csv files #457

Closed
yamanq opened this issue Oct 16, 2020 · 7 comments
Closed

Cursor position adds empty rows or columns to csv files #457

yamanq opened this issue Oct 16, 2020 · 7 comments

Comments

@yamanq
Copy link
Contributor

yamanq commented Oct 16, 2020

Compiler used and options (although Makefile would be welcome)

Used the Makefile that was provided with the project and the standard options for building on Linux.

Actions done

  1. Open sc-im with either a csv file or just a blank spreadsheet
  2. Add values to the spreadsheet
  3. Move the cursor past last data value in either direction (rows or columns)
  4. Save back to csv file

sc-im behavior

Adds unexpected empty lines and/or commas. For example, if you input a number on A1 and move the cursor down to C5, there would be empty rows/columns after you save. If you move the cursor back up before saving, those empty rows/columns would disappear.

Expected behavior

Moving the cursor should not add empty rows/columns in csv files, especially if this only depends on the location of the cursor at the time of saving.

@andmarti1424
Copy link
Owner

Yes, you can call this a bug. Btw, you can always select the range you want to export and do it with
:e csv

andmarti1424 added a commit that referenced this issue Mar 26, 2021
@andmarti1424
Copy link
Owner

@yamanq Could you please update to latest commit and try again? Thanks.

@yamanq
Copy link
Contributor Author

yamanq commented Mar 26, 2021

@andmarti1424 Thanks for working on this. It seems that the issue is fixed with extra rows, but extra columns are still added if the cursor is moved based the last column.

andmarti1424 added a commit that referenced this issue Mar 26, 2021
@andmarti1424
Copy link
Owner

@yamanq Could you please update to latest commit and try again? Thanks!!

@yamanq
Copy link
Contributor Author

yamanq commented Mar 26, 2021

@andmarti1424 I tried from a787115 and it results in some bugs in how the file is saved. I opened a csv file with 2 rows and 3 columns. Any element added past the third column is not saved and any element added past the second row results in the third column being deleted. Also, just placing the cursor on the third row and then saving results in the third column being deleted.

andmarti1424 added a commit that referenced this issue Mar 26, 2021
@andmarti1424
Copy link
Owner

I made some changes. I have tested it with 2 rows and 3 columns. It works ok for me now. Please retry. Thanks

@yamanq
Copy link
Contributor Author

yamanq commented Mar 26, 2021

It works perfectly now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants