ilai-deutel / kibi

A text editor in ≤1024 lines of code, written in Rust
Other
1.46k stars 83 forks source link

add configuration item : terminal_encoding #263

Closed cmanlh closed 10 months ago

cmanlh commented 10 months ago

to support different cmd or shell encoding enviroment when execute external command

remove windows line break character \r when paste command's output to editor

codecov[bot] commented 10 months ago

Codecov Report

Attention: 19 lines in your changes are missing coverage. Please review.

Comparison is base (f090efb) 42.96% compared to head (3d0031f) 41.60%.

:exclamation: Current head 3d0031f differs from pull request most recent head 0368483. Consider uploading reports for the commit 0368483 to get more accurate results

Files Patch % Lines
src/editor.rs 0.00% 15 Missing :warning:
src/config.rs 33.33% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #263 +/- ## ========================================== - Coverage 42.96% 41.60% -1.37% ========================================== Files 10 10 Lines 903 935 +32 ========================================== + Hits 388 389 +1 - Misses 515 546 +31 ``` | [Flag](https://app.codecov.io/gh/ilai-deutel/kibi/pull/263/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ila%C3%AF+Deutel) | Coverage Δ | | |---|---|---| | [x86_64-apple-darwin](https://app.codecov.io/gh/ilai-deutel/kibi/pull/263/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ila%C3%AF+Deutel) | `41.60% <9.52%> (-1.37%)` | :arrow_down: | | [x86_64-unknown-linux-gnu](https://app.codecov.io/gh/ilai-deutel/kibi/pull/263/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ila%C3%AF+Deutel) | `41.49% <9.52%> (-1.36%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ila%C3%AF+Deutel#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ilai-deutel commented 10 months ago

Hi, thank you for your contribution!

Thanks!

cmanlh commented 10 months ago

Hi, thank you for your contribution!

  • Unfortunately, this PR doesn't pass the LOC check. This project is limited to 1024 lines of code per design, but this PR brings the total LOC to 1041 lines (unix) and 1026 lines (windows). Can this be refactored to account for this.

I can try it.

  • By design, this project avoids dependencies as much as possible (see #dependencies). Can this be achieved without depending on encoding_rs?

If we don't use 'encoding-rs', it means that we need to maintain a set of character encoding and decoding modules. As an editor, Kibi should focus on "editing" at this stage and should not waste energy on other aspects. As a rust language learning project, perhaps implementing an encoding and decoding module itself is also a good learning opportunity.However, it requires expertise in character encoding, which is currently unavailable.

Thanks!