]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agofix clippy::redundant_clones warnings.
Matthias Krüger [Fri, 26 Oct 2018 12:45:25 +0000 (14:45 +0200)]
fix clippy::redundant_clones warnings.

5 years agoMerge pull request #3134 from otavio/issue-3104
Nick Cameron [Thu, 25 Oct 2018 02:03:59 +0000 (15:03 +1300)]
Merge pull request #3134 from otavio/issue-3104

Stabilize `edition` configuration option

5 years agoStabilize `edition` configuration option
Otavio Salvador [Thu, 25 Oct 2018 01:31:42 +0000 (22:31 -0300)]
Stabilize `edition` configuration option

Refs: #3104.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoMerge pull request #3133 from otavio/rework-readme
Nick Cameron [Thu, 25 Oct 2018 01:35:42 +0000 (14:35 +1300)]
Merge pull request #3133 from otavio/rework-readme

README: remove old requirement for Rust 2018 edition use

5 years agoREADME: remove old requirement for Rust 2018 edition use
Otavio Salvador [Tue, 23 Oct 2018 04:50:27 +0000 (01:50 -0300)]
README: remove old requirement for Rust 2018 edition use

From now on, the `Cargo.toml` is taken into account when triggering
formatting using `cargo fmt`.

It is considered editor's duty to pass the proper `--edition` argument
for `rustfmt` if it is being called manually.

Refs: #3104.
Refs: #3129.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoMerge pull request #3129 from otavio/issue-3104
Nick Cameron [Thu, 25 Oct 2018 00:39:40 +0000 (13:39 +1300)]
Merge pull request #3129 from otavio/issue-3104

cargo-fmt: detect Rust edition in use

5 years agoMerge pull request #3113 from scampi/issue3105
Nick Cameron [Wed, 24 Oct 2018 23:09:12 +0000 (12:09 +1300)]
Merge pull request #3113 from scampi/issue3105

Fix handling of code that is annotated with rustfmt::skip.

5 years agocargo-fmt: Take into account the edition for each target
Otavio Salvador [Tue, 23 Oct 2018 05:33:46 +0000 (02:33 -0300)]
cargo-fmt: Take into account the edition for each target

When formatting the crate, with `cargo fmt`, it parses each target
with the specific Rust edition.

Fixes: #3104.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agokeep track of lines which formatting was disabled in order to prevent indentation...
Stéphane Campinas [Tue, 23 Oct 2018 23:24:56 +0000 (01:24 +0200)]
keep track of lines which formatting was disabled in order to prevent indentation which would cause code right-shifting

5 years agoFix handling of code that is annotated with rustfmt::skip.
Stéphane Campinas [Thu, 18 Oct 2018 20:58:45 +0000 (22:58 +0200)]
Fix handling of code that is annotated with rustfmt::skip.

A rustfmt::skip'ed block is indented although original lines are
returned. In order to resolve this, the leading whitespaces are trimmed
on each line while retaining the layout; this leaves the skipped code
to be indented as necessary by the caller.

5 years agoMerge pull request #3130 from JoshBrudnak/master
Nick Cameron [Wed, 24 Oct 2018 05:13:42 +0000 (18:13 +1300)]
Merge pull request #3130 from JoshBrudnak/master

Added crates to the non-alphabetical treated imports

5 years agoRemove the source test file
Nick Cameron [Wed, 24 Oct 2018 05:13:26 +0000 (18:13 +1300)]
Remove the source test file

5 years agoRevert "Use `width_heuristics` in the options docs"
Nick Cameron [Wed, 24 Oct 2018 02:07:09 +0000 (15:07 +1300)]
Revert "Use `width_heuristics` in the options docs"

This reverts commit fa3cadf62c11cd8163f08029026a8475ad2b60fd.

5 years agoMerge pull request #3116 from kellerkindt/patch-1
Nick Cameron [Wed, 24 Oct 2018 02:01:14 +0000 (15:01 +1300)]
Merge pull request #3116 from kellerkindt/patch-1

Add howto for CLion / IntelliJ IDE integration

5 years agoAdded test for crate non-alphabetizing
JoshBrudnak [Tue, 23 Oct 2018 23:00:42 +0000 (19:00 -0400)]
Added test for crate non-alphabetizing

5 years agoAdd howto for CLion / IntelliJ IDE integration
kellerkindt [Tue, 23 Oct 2018 07:07:46 +0000 (09:07 +0200)]
Add howto for CLion / IntelliJ IDE integration

5 years agoTreat crates non-alphabetically Fixes: #3118
JoshBrudnak [Mon, 22 Oct 2018 22:49:10 +0000 (18:49 -0400)]
Treat crates non-alphabetically Fixes: #3118

5 years agorustfmt: add support to specify the Rust edition as argument
Otavio Salvador [Tue, 23 Oct 2018 05:33:38 +0000 (02:33 -0300)]
rustfmt: add support to specify the Rust edition as argument

The new `--edition` command line argument allow the setting of the
desired Rust edition to be used.

Refs: #3104.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agolib: export config::Edition so it can be used externally
Otavio Salvador [Tue, 23 Oct 2018 05:33:36 +0000 (02:33 -0300)]
lib: export config::Edition so it can be used externally

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoconfig: use 2015 as default Edition
Otavio Salvador [Tue, 23 Oct 2018 05:33:33 +0000 (02:33 -0300)]
config: use 2015 as default Edition

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoCargo.lock: update `cargo_metadata` to 0.6.1 release
Otavio Salvador [Tue, 23 Oct 2018 05:33:30 +0000 (02:33 -0300)]
Cargo.lock: update `cargo_metadata` to 0.6.1 release

The update is especially important as it adds support for the
`edition` field handling, when parsing `cargo` metadata.

Refs: #3104.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agorustfmt: avoid duplicating the error handling for `--emit`
Otavio Salvador [Tue, 23 Oct 2018 05:33:25 +0000 (02:33 -0300)]
rustfmt: avoid duplicating the error handling for `--emit`

There is no need to produce the error message again as it is already
produced by the helper method that does the emit mode validation.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoUse `width_heuristics` in the options docs
Nick Cameron [Tue, 23 Oct 2018 01:59:14 +0000 (14:59 +1300)]
Use `width_heuristics` in the options docs

It was using an older name

5 years agoMerge pull request #3126 from topecongiro/issue-3117
Nick Cameron [Mon, 22 Oct 2018 21:35:32 +0000 (10:35 +1300)]
Merge pull request #3126 from topecongiro/issue-3117

Use correct width when formatting type on local statement

5 years agoMerge pull request #3114 from matthiaskrgr/typos
Seiichi Uchida [Mon, 22 Oct 2018 13:22:31 +0000 (22:22 +0900)]
Merge pull request #3114 from matthiaskrgr/typos

fix a few typos found via codespell.

5 years agoUse correct width when formatting type on local statement
Seiichi Uchida [Mon, 22 Oct 2018 13:20:25 +0000 (22:20 +0900)]
Use correct width when formatting type on local statement

5 years agoAdd a test for #3117
Seiichi Uchida [Mon, 22 Oct 2018 13:17:16 +0000 (22:17 +0900)]
Add a test for #3117

5 years agofix a few typos found via codespell.
Matthias Krüger [Thu, 18 Oct 2018 22:44:14 +0000 (00:44 +0200)]
fix a few typos found via codespell.

5 years agoMerge pull request #3115 from matthiaskrgr/clippy
Seiichi Uchida [Fri, 19 Oct 2018 08:05:33 +0000 (17:05 +0900)]
Merge pull request #3115 from matthiaskrgr/clippy

fix a couple of clippy lint warnings

5 years agofix a couple of clippy lint warnings
Matthias Krüger [Thu, 18 Oct 2018 23:11:28 +0000 (01:11 +0200)]
fix a couple of clippy lint warnings

simplify a comparison with "true"
fn can_be_overflowed: remove unused lifetime
fn rewrite_pairs_one_line: pass "list" by reference (it is not consumed in the function)
fn span_for_token_stream: pass "token_stream" by reference since it is not consumed
use tool lints for clippy suppressions

5 years agoMerge pull request #3109 from scampi/issue-3038
Nick Cameron [Thu, 18 Oct 2018 06:56:17 +0000 (19:56 +1300)]
Merge pull request #3109 from scampi/issue-3038

force a newline after the `if` condition if there is a different indentation level

5 years agoUpdate rustc-ap-syntax
Nick Cameron [Thu, 18 Oct 2018 02:44:31 +0000 (15:44 +1300)]
Update rustc-ap-syntax

5 years agoRemove NLL feature
Nick Cameron [Wed, 17 Oct 2018 22:45:55 +0000 (11:45 +1300)]
Remove NLL feature

And do some refactoring in comments.rs

Closes #3107

5 years agoRemove various feature flags
Nick Cameron [Wed, 17 Oct 2018 20:55:21 +0000 (09:55 +1300)]
Remove various feature flags

5 years agoAdd `rustc-workspace-hack` workaround like RLS/Cargo
Alex Crichton [Wed, 17 Oct 2018 19:47:21 +0000 (12:47 -0700)]
Add `rustc-workspace-hack` workaround like RLS/Cargo

5 years agoCatch parser panic in format_snippet (#3103)
Seiichi Uchida [Wed, 17 Oct 2018 05:21:04 +0000 (14:21 +0900)]
Catch parser panic in format_snippet (#3103)

5 years agoforce a newline after the `if` condition if there is a different
Stéphane Campinas [Mon, 15 Oct 2018 21:24:35 +0000 (23:24 +0200)]
force a newline after the `if` condition if there is a different
indentation level

5 years agoMerge pull request #3106 from sinkuu/clippy
Nick Cameron [Mon, 15 Oct 2018 20:09:56 +0000 (09:09 +1300)]
Merge pull request #3106 from sinkuu/clippy

Clippy and cleanups

5 years agoMerge pull request #3102 from nrc/arm-guard-newline
Nick Cameron [Mon, 15 Oct 2018 20:06:15 +0000 (09:06 +1300)]
Merge pull request #3102 from nrc/arm-guard-newline

 Only put `{` on a newline in a match arm where necessary

5 years agoMerge pull request #3101 from nrc/pair-newline
Nick Cameron [Mon, 15 Oct 2018 20:01:40 +0000 (09:01 +1300)]
Merge pull request #3101 from nrc/pair-newline

Simplify multi-lining binop exprs

5 years agoCargo.lock
Shotaro Yamada [Mon, 15 Oct 2018 14:50:01 +0000 (23:50 +0900)]
Cargo.lock

5 years agoReduce allocations
Shotaro Yamada [Mon, 15 Oct 2018 12:20:03 +0000 (21:20 +0900)]
Reduce allocations

5 years agoUse concat() instead of join("")
Shotaro Yamada [Mon, 15 Oct 2018 12:10:34 +0000 (21:10 +0900)]
Use concat() instead of join("")

5 years agoCleanup
Shotaro Yamada [Wed, 10 Oct 2018 01:50:25 +0000 (10:50 +0900)]
Cleanup

5 years agoClippy
Shotaro Yamada [Mon, 15 Oct 2018 11:36:39 +0000 (20:36 +0900)]
Clippy

5 years agoUse UnOp::to_string
Shotaro Yamada [Tue, 9 Oct 2018 12:47:00 +0000 (21:47 +0900)]
Use UnOp::to_string

5 years agoRemove an unsafe code
Shotaro Yamada [Tue, 9 Oct 2018 12:28:40 +0000 (21:28 +0900)]
Remove an unsafe code

5 years agotry to fix comment bad wrapping (#3099)
Daniele D'Orazio [Mon, 15 Oct 2018 02:18:37 +0000 (04:18 +0200)]
try to fix comment bad wrapping (#3099)

5 years agoAdd test (issue 3005)
Nick Cameron [Mon, 15 Oct 2018 01:09:31 +0000 (14:09 +1300)]
Add test (issue 3005)

5 years agoOnly put `{` on a newline in a match arm where necessary
Nick Cameron [Mon, 15 Oct 2018 01:06:52 +0000 (14:06 +1300)]
Only put `{` on a newline in a match arm where necessary

Fixes #3005

5 years agoadd test
Nick Cameron [Sun, 14 Oct 2018 23:09:53 +0000 (12:09 +1300)]
add test

5 years agoMerge pull request #3096 from otavio/use-bytecount-count
Nick Cameron [Sun, 14 Oct 2018 23:07:58 +0000 (11:07 +1200)]
Merge pull request #3096 from otavio/use-bytecount-count

utils: rewrite `count_newlines` using `bytecount::count`

5 years agoFixup formatting
Nick Cameron [Sun, 14 Oct 2018 22:52:27 +0000 (11:52 +1300)]
Fixup formatting

5 years agoSimplify situations in which the last sub-expr in a bin-op can go multiline without...
Nick Cameron [Sun, 14 Oct 2018 22:48:12 +0000 (11:48 +1300)]
Simplify situations in which the last sub-expr in a bin-op can go multiline without making the whole expr multiline

Fixes #3034

5 years agoutils: rewrite `count_newlines` using `bytecount::count`
Otavio Salvador [Sat, 13 Oct 2018 20:39:19 +0000 (17:39 -0300)]
utils: rewrite `count_newlines` using `bytecount::count`

This uses a optimized byte count and also makes use of SIMD
instructions to optimize the processing of the byte arrays.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoMerge pull request #3100 from topecongiro/issue-3092
Nick Cameron [Sun, 14 Oct 2018 20:07:59 +0000 (08:07 +1200)]
Merge pull request #3100 from topecongiro/issue-3092

Fix poor formatting of empty trait with generic bounds

5 years agoMerge pull request #3093 from scampi/issue2633
Nick Cameron [Sun, 14 Oct 2018 19:57:39 +0000 (07:57 +1200)]
Merge pull request #3093 from scampi/issue2633

do not vertically align list items in case the tactic is Horizontal

5 years agoMerge pull request #3091 from topecongiro/issue-3060
Nick Cameron [Sun, 14 Oct 2018 19:40:34 +0000 (07:40 +1200)]
Merge pull request #3091 from topecongiro/issue-3060

Do not add parens around lifetimes

5 years agoUse correct width
Seiichi Uchida [Sun, 14 Oct 2018 12:44:56 +0000 (21:44 +0900)]
Use correct width

When rewriting trait bounds on the next line, we do not want to add an extra
indentation. However, the max width should be smaller.

5 years agoAdd a correct indent before trait's closing brace with empty body
Seiichi Uchida [Sun, 14 Oct 2018 12:43:59 +0000 (21:43 +0900)]
Add a correct indent before trait's closing brace with empty body

5 years agoAdd a test for #3092
Seiichi Uchida [Sun, 14 Oct 2018 12:43:35 +0000 (21:43 +0900)]
Add a test for #3092

5 years agoMerge pull request #3095 from otavio/avoid-overflow-control-flow-expr
Seiichi Uchida [Sun, 14 Oct 2018 12:03:27 +0000 (21:03 +0900)]
Merge pull request #3095 from otavio/avoid-overflow-control-flow-expr

Avoid control flow expressions conditions to go multi line

5 years agoMerge pull request #3094 from otavio/avoid-unwrap-or
Seiichi Uchida [Sun, 14 Oct 2018 12:02:39 +0000 (21:02 +0900)]
Merge pull request #3094 from otavio/avoid-unwrap-or

Replace `.unwrap_or` with `.map_or` in few places

5 years agoAvoid control flow expressions conditions to go multi line
Otavio Salvador [Sat, 13 Oct 2018 12:05:54 +0000 (09:05 -0300)]
Avoid control flow expressions conditions to go multi line

Extends the multi line condition to over other control flow
expressions, it now covers: `if`, `if let`, `for`, `loop`, `while`,
`while let` and `match`.

Refs: #3029

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agohandle lines prefixed with a # inside code blocks
Stéphane Campinas [Sat, 13 Oct 2018 07:57:43 +0000 (09:57 +0200)]
handle lines prefixed with a # inside code blocks

5 years agoMerge pull request #3090 from otavio/issue-3029
Seiichi Uchida [Sat, 13 Oct 2018 01:36:31 +0000 (10:36 +0900)]
Merge pull request #3090 from otavio/issue-3029

Only combine `match` if its condition expression fits in a single line

5 years agobin: replace `.unwrap_or` with `.map_or`
Otavio Salvador [Fri, 12 Oct 2018 23:22:10 +0000 (20:22 -0300)]
bin: replace `.unwrap_or` with `.map_or`

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoconfig: replace `.unwrap_or` with `.map_or`
Otavio Salvador [Fri, 12 Oct 2018 23:21:48 +0000 (20:21 -0300)]
config: replace `.unwrap_or` with `.map_or`

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoexpr: replace `.unwrap_or` with `.map_or`
Otavio Salvador [Fri, 12 Oct 2018 23:21:22 +0000 (20:21 -0300)]
expr: replace `.unwrap_or` with `.map_or`

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoOnly combine `match` if its condition expression fits in a single line
Otavio Salvador [Mon, 8 Oct 2018 23:49:33 +0000 (20:49 -0300)]
Only combine `match` if its condition expression fits in a single line

This improves the formatting and reading of code avoiding the
condition expression to be rewrite, if it goes multi line.

Fixes: #3029.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoclosures: replace `.unwrap_or` with `.map_or`
Otavio Salvador [Fri, 12 Oct 2018 23:07:25 +0000 (20:07 -0300)]
closures: replace `.unwrap_or` with `.map_or`

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agodo not vertically align list items in case the tactic is Horizontal
Stéphane Campinas [Fri, 12 Oct 2018 18:41:56 +0000 (20:41 +0200)]
do not vertically align list items in case the tactic is Horizontal

5 years agoDo not add parens around lifetimes
Seiichi Uchida [Fri, 12 Oct 2018 15:41:17 +0000 (00:41 +0900)]
Do not add parens around lifetimes

Parens should be added only around trait objects.

5 years agoAdd a test for #3060
Seiichi Uchida [Fri, 12 Oct 2018 15:40:34 +0000 (00:40 +0900)]
Add a test for #3060

5 years agoAdd `attr_fn_like_width` to the width heuristics
Nick Cameron [Fri, 12 Oct 2018 02:17:27 +0000 (15:17 +1300)]
Add `attr_fn_like_width` to the width heuristics

It is a bit larger than than `fn_call_width` which we used previously, so fewer attributes get reformatted.

Closes #2929

5 years agoMerge pull request #3089 from topecongiro/format-comment
Nick Cameron [Thu, 11 Oct 2018 21:55:45 +0000 (09:55 +1200)]
Merge pull request #3089 from topecongiro/format-comment

Add format_doc_comments

5 years agoMerge pull request #3086 from otavio/bump-rustc-ap-272
Nick Cameron [Thu, 11 Oct 2018 21:45:33 +0000 (09:45 +1200)]
Merge pull request #3086 from otavio/bump-rustc-ap-272

Update rustc-ap-* to 272.0.0

5 years agoAdd format_doc_comments
Seiichi Uchida [Thu, 11 Oct 2018 14:10:57 +0000 (23:10 +0900)]
Add format_doc_comments

5 years agoMerge pull request #3088 from otavio/fix-misleading-comment
Seiichi Uchida [Thu, 11 Oct 2018 13:52:17 +0000 (22:52 +0900)]
Merge pull request #3088 from otavio/fix-misleading-comment

rewrite: adjust comment as it refers to `is_if_else_block`

5 years agorewrite: adjust comment as it refers to `is_if_else_block`
Otavio Salvador [Thu, 11 Oct 2018 13:21:15 +0000 (10:21 -0300)]
rewrite: adjust comment as it refers to `is_if_else_block`

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoMerge pull request #3087 from scampi/lineoverflow
Seiichi Uchida [Thu, 11 Oct 2018 08:36:39 +0000 (17:36 +0900)]
Merge pull request #3087 from scampi/lineoverflow

fixed display message for the LineOverflow error

5 years agofixed display message for the LineOverflow error
Stéphane Campinas [Thu, 11 Oct 2018 07:05:33 +0000 (09:05 +0200)]
fixed display message for the LineOverflow error

5 years agoUpdate rustc-ap-* to 272.0.0
Otavio Salvador [Thu, 11 Oct 2018 00:53:25 +0000 (21:53 -0300)]
Update rustc-ap-* to 272.0.0

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoMerge pull request #3084 from otavio/issue-1990
Nick Cameron [Tue, 9 Oct 2018 22:40:18 +0000 (10:40 +1200)]
Merge pull request #3084 from otavio/issue-1990

Enable `stdin_disable_all_formatting_test` test

5 years agoMerge pull request #3083 from scampi/itemized_blocks
Nick Cameron [Tue, 9 Oct 2018 22:38:54 +0000 (10:38 +1200)]
Merge pull request #3083 from scampi/itemized_blocks

Handle itemized blocks in comments

5 years agorewrite_string: detect when a url is being split and place the new line
Stéphane Campinas [Tue, 9 Oct 2018 19:47:32 +0000 (21:47 +0200)]
rewrite_string: detect when a url is being split and place the new line
after it

5 years agoMerge pull request #3085 from otavio/extend-gitignore
Seiichi Uchida [Tue, 9 Oct 2018 13:49:33 +0000 (22:49 +0900)]
Merge pull request #3085 from otavio/extend-gitignore

.gitignore: Ignore Emacs backup files

5 years agoEnable `stdin_disable_all_formatting_test` test
Otavio Salvador [Tue, 9 Oct 2018 12:06:16 +0000 (09:06 -0300)]
Enable `stdin_disable_all_formatting_test` test

Fixes: #1990.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years ago.gitignore: Ignore Emacs backup files
Otavio Salvador [Tue, 9 Oct 2018 08:25:31 +0000 (05:25 -0300)]
.gitignore: Ignore Emacs backup files

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agohandle itemized items inside comments
Stéphane Campinas [Mon, 8 Oct 2018 09:44:23 +0000 (11:44 +0200)]
handle itemized items inside comments

5 years agoMerge pull request #3082 from otavio/bump-dependencies
Nick Cameron [Mon, 8 Oct 2018 20:01:25 +0000 (08:01 +1200)]
Merge pull request #3082 from otavio/bump-dependencies

Bump dependencies

5 years agoMerge pull request #3080 from topecongiro/issue-3031
Nick Cameron [Mon, 8 Oct 2018 20:00:45 +0000 (08:00 +1200)]
Merge pull request #3080 from topecongiro/issue-3031

Format macro calls with item-like arguments

5 years agoBump rustc-ap-* to 270.0.0
Otavio Salvador [Mon, 8 Oct 2018 17:42:54 +0000 (14:42 -0300)]
Bump rustc-ap-* to 270.0.0

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoReplace `isatty` crate with `atty`
Otavio Salvador [Mon, 8 Oct 2018 17:39:16 +0000 (14:39 -0300)]
Replace `isatty` crate with `atty`

The `isatty` crate has been deprecated and a replacement has been
released for it called `atty`. It offers a nicer API and the code
change to adapt is trivial.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agorewrite_string: allow to break on a boundary character that is on edge
Stéphane Campinas [Sun, 7 Oct 2018 20:57:07 +0000 (22:57 +0200)]
rewrite_string: allow to break on a boundary character that is on edge

5 years agorewrite_string: retain blank lines that are trailing
Stéphane Campinas [Sun, 7 Oct 2018 20:53:48 +0000 (22:53 +0200)]
rewrite_string: retain blank lines that are trailing

5 years agorewrite_string: take care of blank lines appearing within the last line
Stéphane Campinas [Fri, 5 Oct 2018 15:09:17 +0000 (17:09 +0200)]
rewrite_string: take care of blank lines appearing within the last line

5 years agorewrite_string: handle newlines in the last line that fits in the shape for cases...
Stéphane Campinas [Thu, 4 Oct 2018 11:56:57 +0000 (13:56 +0200)]
rewrite_string: handle newlines in the last line that fits in the shape for cases where line_start is not a whitespace

5 years agorewrite_string: do not overflow the next line when the line_start is not a whitespace
Stéphane Campinas [Thu, 4 Oct 2018 09:40:47 +0000 (11:40 +0200)]
rewrite_string: do not overflow the next line when the line_start is not a whitespace

5 years agorewrite_string: trim trailing whitespace in case the last_line fits in the given...
Stéphane Campinas [Thu, 4 Oct 2018 07:16:08 +0000 (09:16 +0200)]
rewrite_string: trim trailing whitespace in case the last_line fits in the given shape